[thelist] Rollover code from evolt

Anthony Baratta Anthony at Baratta.com
Tue Mar 6 02:56:50 CST 2001

At 12:45 AM 3/6/2001, you wrote:
>      I don't want to use Dreamweaver rollover code anymore and I remember
>this code that Anthony posted a LOOONG time ago (address may wrap):

ohmygwad - someone actually found that olde musty archive....LOL

>Two questions (BTW, I'm a JavaScript dunderhead):
>1) Is this code still current? IOW, is it dated, now that IE 5 and NN6 are
>out? I'm looking for general cross browser/platform compatibility (4.0 is
>low enough for me).

IE 5.0 should be fine. Haven't tested it with 6.0. I don't even remember 
which sites I've used that code snippet at. If I can rustle up some, I'll 
let you know.

>Does the code preload images? I remember a long discussion about
>preloading regarding this (or related) code, but can't find the
>original thread (I don't think I'd understand it anyway).

It should. The function "F_loadRollover" is called with "onLoad" event for 
the target image. This is one of the weaknesses of this script. You have to 
not only use the onMouseOver, onMouseOut events - you also have to use the 
onLoad event, for each Image. This can create a lot of HTML clutter. The 
"F_loadRollover" also builds a "public array" of all the roll over images 
for use by "F_roll". Not sure of the memory hit taken by this on a page 
with a ton of roll overs.

But on the other hand, you are embedded the logic right into the target 
images. This might be "better" from a construction stand point.

Hope this helps.

Anthony Baratta
Keyboard Jockeys

More information about the thelist mailing list