Welcome to WebmasterWorld Guest from 54.144.114.177

Forum Moderators: not2easy

Message Too Old, No Replies

Animation and JavaScripts

Why do they stop?

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

Senior Member from US 

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

joined:Sept 26, 2001
posts:5800
votes: 64


If I have animated .gif files on a page, they always stop when I start a JavaScript. Is there a work around for this?
11:17 pm on Mar 23, 2002 (gmt 0)

Senior Member

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

joined:Dec 6, 2000
posts:3928
votes: 0


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).

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

Senior Member from US 

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

joined:Sept 26, 2001
posts:5800
votes: 64


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

Senior Member

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

joined:Mar 20, 2002
posts:3732
votes: 0


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.

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

Senior Member

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

joined:Dec 6, 2000
posts:3928
votes: 0


Oooh... Thanks korkus! ::scribbles notes::
7:18 pm on Mar 27, 2002 (gmt 0)

Senior Member

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

joined:Mar 20, 2002
posts:3732
votes: 0


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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members