Welcome to WebmasterWorld Guest from 23.22.19.253

Forum Moderators: open

Message Too Old, No Replies

Goofy JavaScript/Animated GIF question....

nifty onload behavior....

   
5:24 am on Jan 29, 2002 (gmt 0)

10+ Year Member



Had a page with an animated gif...page also had a form that the needed to start up with the cursor in the first field, so wrote javascript to do it. Usually, I'd throw an onload into the body tag, but in this files case, the body was in an include that was shared amongst other pages (that didn't contain a form...)

So, not really payin' much attention, I threw the onload into the first graphic I noticed on the page. Turns out it was the animated one.

Started fillin' in fields on the page and noticed that every once in a while, my cursor would be thrown back into the first field. Being a long day, and lack of sleep kickin' in, I spent about a half hour trying to figure it out, 'till I noticed it was timed perfectly for the beginning of the animation sequence. Moved the onload to a different non-animated graphic and it worked just peachy. :)

Usin' IE6 on Win2k. Is this common behavior amongst the browsers? I mean, when I think about it, it makes sense, and proves to be quite humorous to the unaware. ;)

6:58 am on Jan 29, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Thanks for the heads up, evinrude.

I've noticed that the Stop button will stop an animated gif in Netscape 4.x, and all version of IE. That's probably related behavior.

Netscape 6.2 greys out the Stop button once the download is finished, and Opera switches it to a Reload. I wonder if your onLoad would work on those two?