RE: stand-alone image preload?
by "Phil Babcock" <pbabcock(at)bgsgroup.com>
|
| Date: |
Thu, 27 Apr 2000 13:16:30 -0400 |
| To: |
pbenoit(at)triton-network.com, "hwg-languages(at)hwg.org" <hwg-languages(at)hwg.org> |
| References: |
network |
| |
todo: View
Thread,
Original
|
|
Ok, but how I can do it without ever referencing the javascipt preload
variables again? ie: without using the document.write or the "myimg" name.
Something like this, if it works:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
preload(my.jpg);
// -->
</SCRIPT>
</HEAD>
<BODY>
<img src="my.jpg">
</BODY>
Of course what I am missing is a preload() function. I dont like the
method you suggested because I dont want to use javascript ever again on
the page, once the preload is done. Every example I find uses this method,
is there another?
*********** REPLY SEPARATOR ***********
Peter Benoit wrote:
><SCRIPT LANGUAGE="JavaScript">
><!--
>
>if(document.images){
>myimg = new Image()
>myimg.src = "my.jpg"
>}
>
>// -->
></SCRIPT>
></HEAD>
>
><BODY>
>
>
><SCRIPT LANGUAGE="JavaScript">
><!--
>
>document.write ('<IMG SRC='+myimg.src+'>');
>
>// -->
></SCRIPT>
></BODY>
>
>There, you just preloaded and displayed the preloaded image in your
browser.
>
>HTH,
>Peter
>
>> -----Original Message-----
>> From: Phil Babcock [SMTP:pbabcock(at)bgsgroup.com]
>> Sent: Thursday, April 27, 2000 11:38 AM
>> To: hwg-languages(at)hwg.org
>> Subject: stand-alone image preload?
>>
>> Hi all
>>
>> Can anyone recomend a stand-alone javascript image preloader? I say
>> stand-alone because all of the ones I have found seem to be used in
>> conjunction with a rollover script. What if I am not doing a rollover?
>> How do I just preload any image(s) I like?
>>
>> tia!
>>
>> Phil Babcock
>> Lead Web Designer
>> BGS Group Inc.
*********** END REPLY SEPARATOR ***********
Phil Babcock
Lead Web Designer
BGS Group Inc.
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.