[Javascript] Calling images only when needed.

Richard nomorebull at charter.net
Mon Feb 14 15:44:32 CST 2005


> >>Suppose that I wind up with 600 plus images I want to show off.
> >>Is there a way to keep the thumbnails from downloading and causing a
> >>long wait before the menu falls back to the collapsed state? I don't see
> >>why I have to code in every cotton pickin image and force the visitor to
> >>accept the 600 thumbnails.
>>
>> Richard,
>>
>> If you use CSS to apply {display: none;} to an image (or an image's
>> container) it will not download until you change this to {display:
>> block;} or {display: inline;}.
>
> Unfortunately that is true only in Opera and Safari. Explorer (Win and
> Mac) and Mozilla immediately download the images.
>

That's why I need something else to control how the images are displayed and
when.
Why should a dial up user suffer and wait while the images are being
downloaded never to be seen by the visitor? And take up space on his
machine.
I'm looking at the high probability of doing an array for each selection,
then load the images when they're called on.
At least that way the user wouldn't be waiting so long.





More information about the Javascript mailing list