Mary McWilliams Johnson <[EMAIL PROTECTED]> writes:

> I would be interested to know how you preload graphics with Javascript. The
> ploy I've used in the past is to load images on the "previous" page with
> pixel dimensions of 1x1, like so:
>       <IMG SRC="picture.gif" HEIGHT=1 WIDTH=1>
> Is the Javascript method better?

Well, better.... The above is against HTML specs, if you're
orthodox. In Javascript it suffices to say:

<script language="JavaScript">
nice_image = new Image();
nice_image.src = "images/nice.jpeg";
</script>

to have the image preloaded 'behind the scenes'. 

I just posted a code snippet to Suzanne for 'just-in-time' preloading
of the next of a sequence of images. I could repost that on the list
if anyone is interested.

:*CU#
-- 
***    Guido A.J. Stevens      ***    mailto:[EMAIL PROTECTED]    ***
***    Net Facilities Group    ***    tel:+31.43.3618933    ***   
***    http://www.nfg.nl       ***    fax:+31.43.3560502    ***   

PGP fingerprint E3 56 AA 30 44 EE 9E E9 CA 52 C5 B8 66 2F 77 21
____________________________________________________________________
--------------------------------------------------------------------
 Join The Web Consultants Association :  Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------

Reply via email to