|
-
Sep 8th, 2001, 11:00 AM
#1
Thread Starter
Lively Member
body onLoad
Hi,
I've got a problem with a page that has some rollover images that are pre-loaded. I load both the default image and the rollover images into variables / objects (whatever) in a function called init()
Now, on my page,
<body onload=init();>
to fire off the init routine.
If however, you leave your mouse over the image or quickly move it to another one before the whole page has loaded up, I get a javascript error saying that the object is not loaded.
Is there a standard way to get around this problem ?
ta
Andy
-
Sep 10th, 2001, 07:48 AM
#2
Frenzied Member
first of all, don't preload it with a function,
just preload then in the fist line of your page,!!
the onLoad event fire when all images on a page are finish loaded!
-
Sep 10th, 2001, 07:53 AM
#3
Thread Starter
Lively Member
Hi,
thanks for the reply. I think I actually need to do a couple of calls, one to load the initial images and the second fired by onLoad to set the defaults for the images once they're loaded. Makes sense to me anyhow !
thanks for your help
cheers
Andy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|