Re: Bizarre mouseover
by Thomas James Allen <tjallen(at)pipeline.com>
|
Date: |
Sat, 04 Dec 1999 23:33:27 -0500 |
To: |
"K. Hammond" <hammondeh(at)earthlink.net> |
Cc: |
hwg-basics(at)hwg.org |
|
todo: View
Thread,
Original
|
|
At 08:49 AM 12/4/99 -0500, you wrote:
>I wrote a simple mouseover routine for a page and it's exhibiting some
>bizarre behavior. It's a multiple rollover and everything seems to work
>fine...*unless* I placed the cursor over one of the links that swap
>images before the page finishes downloading. Then the secondary image is
>distored, the rollovers don't swap images, and some of the links don't
>work.
>
----------------
Here is a possible solution:
In the body tag, call a function with "onload"
that enables your swapping scripts. In theory, the
onload event doesn't fire until the whole page is loaded.
This would happen in 3 parts:
First, in your body tag, put something like:
<BODY blah blah blah onload=imLoaded()>
Second, between the head tags, a function like:
function imLoaded() {
var finished=true
}
And finally, in EACH of your image swapping functions, begin with:
if finished {
-swapping stuff here-
}
I think this will work. Maybe. As Chris said, using javascript
before the scripted parts are loaded does lead to bizarre stuff!
Hope this helps,
jimmy
---
Jimmy Allen (Thomas James Allen)
Business - Get Your Website Here
http://www.getyourwebsitehere.com
Personal - Eclecticity
http://www.getyourwebsitehere.com/personal
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA