View Full Version : pasting code
Ugly Joe
09-15-2004, 11:07 PM
<script>
function open_it( img ) {
i = new Image();
i.src = img;
p = "<body style=\"background: white url('" + i.src + "') no-repeat fixed top left;\">";
w = window.open( "", "title", "width=" + i.width + ",height=" +
i.height + ",resizable=yes" );
w.document.write( p );
}
</script>
<a href="javascript:open_it( 'http://www.w3schools.com/images/w3default80.gif' );">here</a>
<P ID="signature"></P>
Ugly Joe
09-15-2004, 11:07 PM
<pre>
<script>
function open_it( img ) {
i = new Image();
i.src = img;
p = "<body style=\"background: white url('" + i.src + "') no-repeat fixed top left;\">";
w = window.open( "", "title", "width=" + i.width + ",height=" +
i.height + ",resizable=yes" );
w.document.write( p );
}
</script>
<a href="javascript:open_it( 'http://www.w3schools.com/images/w3default80.gif' );">here</a>
</pre>
<P ID="signature"></P>
king killa
09-16-2004, 01:35 AM
you cannot use script tags on the forum. instead, you can use onload=something in a tag.
<P ID="signature"></P>
Ugly Joe
09-16-2004, 01:54 AM
> you cannot use script tags on the forum. instead, you can
> use onload=something in a tag.
>
I was testing pasting a code example, not trying to get a script to run. I have to replace all the < and > signs with &lt and $amp;gt. Then if you preview it the whole thing gets buggered. And then if you try and edit it, you're screwed since you have to preview the edit (unless I'm missing something). Also, the <pre> tags kept doubling my new lines, but that's probably my fault somehow.
<P ID="signature"></P>
king killa
09-16-2004, 02:27 AM
> I was testing pasting a code example, not trying to get a
> script to run.
oh.. ok.
<P ID="signature"></P>
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.