> The size of the new image (in pixels).
>
> Jim Davis
Yeah, it took me a minute heh
Just never seen it used before, which raises a question: Since they are
being preloaded, is it really necessary to use the height and width?
Especially if you already have height and width specified in the <img> tag
itself.
Just curious as to rather or not I'd benefit from doing it in the future
with my preloads.
Personally (here) I'd trim each image a pixel around the edges, put a black
css border around them then change the border color to white on hover. You'd
get the same effect and could lose the preload script and double images all
together :)
But this works too...
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from non JavaScript Browsers
Image11 = new Image(156,22)
Image22 = new Image(156,22)
Image33 = new Image(156,22)
Image44 = new Image(156,22)
Image55 = new Image(156,22)
Image66 = new Image(156,22)
Image77 = new Image(156,22)
Image11.src = "http://66.165.123.68/a_on.jpg"
Image22.src = "http://66.165.123.68/b_on.jpg"
Image33.src = "http://66.165.123.68/c_on.jpg"
Image44.src = "http://66.165.123.68/d_on.jpg"
Image55.src = "http://66.165.123.68/e_on.jpg"
Image66.src = "http://66.165.123.68/f_on.jpg"
Image77.src = "http://66.165.123.68/g_on.jpg"
// End Hiding -->
</SCRIPT>
-----Original Message-----
From: Jim Davis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 11, 2005 10:33 PM
To: CF-Talk
Subject: RE: Javascript Image Preloader Question
> -----Original Message-----
> From: Ewok [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 11, 2005 10:23 PM
> To: CF-Talk
> Subject: RE: Javascript Image Preloader Question
>
> What are the numbers in new Image(156,22) ?
The size of the new image (in pixels).
Jim Davis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect Your PC from viruses, hackers, spam and more. Buy PC-cillin with Easy
Installation & Support
http://www.houseoffusion.com/banners/view.cfm?bannerid=61
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190038
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54