homepage Welcome to WebmasterWorld Guest from 54.147.248.118
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 / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
stopping a function
ctoz

5+ Year Member



 
Msg#: 4388805 posted 6:54 am on Nov 19, 2011 (gmt 0)

I have a switch function with four cases each doing several css changes in sequence.

If the user wants to abort, and try another menu item, how to stop the function running?

I'll be looking around, but pointers would be useful. Anyone ?


Cheers!

 

caffinated



 
Msg#: 4388805 posted 2:19 pm on Nov 20, 2011 (gmt 0)

Normally, the term return exits a process. You could use this in conjunction with an if...then statement or a for...next loop. i.e. if the state fails the if...then test, return.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
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