Forum Moderators: open
Here is the tag:
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#0066FF" alink="#2E8B57" onLoad="MM_preloadImages('../images/sidebar/menu_down.jpg','../images/sidebar/coupons_down.jpg','../images/sidebar/party_down.jpg')" OnLoad="rotateImage('rImage')">
First OnLoad is for a roll over image to work, second is for a rotating image javascript. I am not sure if I even need the onload for the rollovers. If I get rid of that onload will the rollovers stop working? If I need them both how do I combine them?
Thanks!
If I get rid of that onload will the rollovers stop working?
If rollover images are not preloaded, then the rollovers will have a time delay when the first mouseover occurs. Smehow the rollover images need to be cached before the first mouseover.
It is possible to preload images without calling a special function onLoad the way this Dreamweaver script does. See Bare Bones rollover [webmasterworld.com] for details.
It is also possible, as Birdman suggests, to combine the functions. One way would be first to define the MM_preloadImages(), and then add an extra line to your definition of the rotateImage() function that calls MM_preloadImages() .
That way, onLoad you only need to call the rotateImage() function, but when it executes, it calls the preloader as part of its job.
[edited by: tedster at 5:56 pm (utc) on Mar. 27, 2003]
onLoad="MM_preloadImages('<code cut for clarity>') ; rotateImage('rImage')">