homepage Welcome to WebmasterWorld Guest from 23.22.128.96
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderator: open

Site Graphics and Multimedia Design Forum

    
Animation and JavaScripts
Why do they stop?
keyplyr




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

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




msg:859141
 11:17 pm on Mar 23, 2002 (gmt 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).

keyplyr




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

Thanks

korkus2000




msg:859143
 6:42 pm on Mar 27, 2002 (gmt 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.

mivox




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

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

korkus2000




msg:859145
 7:18 pm on Mar 27, 2002 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved