Re: Preloading graphics

by Brian <brianj(at)ais.ais-gwd.com>

 Date:  Thu, 02 Apr 1998 14:03:44 -0500
 To:  <hwg-graphics(at)hwg.org>
 References:  westol
  todo: View Thread, Original
Noone Special wrote:

>NOTE: This will give you an error in IE 2.x and 3.x  You should always
>check for browser compatibility if it concerns you.
>
>In Netscape x.x, and IE 4.0:
>
><HTML>
><HEAD>
><SCRIPT LANGUAGE="JavaScript">
>
>frame1 = new Image();
>frame1.src = "http://www.blah.blah/frame1.gif";
>frame2 = new Image();
>frame2.src = "http://www.blah.blah/frame2.gif";
>frame3 = new Image();
>frame3.src = "http://www.blah.blah/frame3.gif";
>frame4 = new Image();
>frame4.src = "http://www.blah.blah/frame4.gif";
---------------

But this *won't* give you an error:


<html><head>
<Script Language="JavaScript" Type="text/JavaScript">
<!-- 
if(document.images) {

     frame1 = new Image();
     frame1.src = "http://www.blah.blah/frame1.gif";
}
-->
</Script>
</head></html>


b.


"Experience is a hard teacher
because she gives the test first, 
the lesson afterward."

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA