Re: graphics loading first in B&W

by "Daren C. Robbins" <dcr(at)nextw3.com>

 Date:  Tue, 8 Sep 1998 10:49:38 -0700
 To:  Michael <mgburski(at)sginet.com>
 Cc:  hwg-graphics(at)hwg.org
 In-Reply-To:  hwg
  todo: View Thread, Original
Well, the page in question used an included JavaScript to change the images
after they had loaded. A better way to do this would be to use the 'lowsrc'
attribute to their <img> tags. lowsrc allows the loading of a lower
resolutions or smaller graphic before loading the real graphic. Use as
follows:

<img src="graphic1.jpg" lowsrc="graphic1-BW.jpg" alt="graphic 1">

where 'graphic1.jpg' is your graphic and 'graphic1-BW.jpg' is a black and
white version of the graphic you have made.

Or you could use the onLoad event handler of JavaScript:

<img src="graphic1-BW.jpg" onLoad="document.images[1].src='graphic1.jpg';"
alt="graphic 1">

The latter method however is supported among a few older browsers. The
former is supported in any browser which supports the HTML4 standard (NN4+
MSIE4+), but will degrade quite a bit more gracefully.

>
>The above page first loads the graphics in B&W and then
>fills in the color. How do you do this?
>


--
Daren C. Robbins | NEXT W3 Internet Services / Web Development
  dcr(at)nextw3.com | 916.457.2242 / http://www.nextw3.com

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