Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: not2easy

Message Too Old, No Replies

Animation and JavaScripts

Why do they stop?

     

keyplyr

9:07 pm on Mar 23, 2002 (gmt 0)

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If I have animated .gif files on a page, they always stop when I start a JavaScript. Is there a work around for this?

mivox

11:17 pm on Mar 23, 2002 (gmt 0)

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



The only thing I could think of is some kind of page refresh tied in with the javascript... You might ask over in our HTML/Page Design [webmasterworld.com] forum for javascripting ideas.

I've noticed animated gifs also stop when you click on any links on the page, and never bothered to hunt too far for an answer (since most people are leaving the page when they click a link).

keyplyr

12:07 am on Mar 24, 2002 (gmt 0)

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Thanks

korkus2000

6:42 pm on Mar 27, 2002 (gmt 0)

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



When you click a link or a form you start the browser event of loading a page even if there is no page to load. This stops animated gifs.

You need to send your forms or links to a javascript that does whatever. It then needs to return false. This will start the gifs back up again. use the return false in an onClick attribute not the href. It won't work in a javascript: href.

If you what to navigate somewhere and you want things to still animate use your location object.

mivox

7:08 pm on Mar 27, 2002 (gmt 0)

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



Oooh... Thanks korkus! ::scribbles notes::

korkus2000

7:18 pm on Mar 27, 2002 (gmt 0)

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



onClick="whatever();return false"

That should do it. I don't know if you let the function return false if it will work. I do it right out of the gate.