Click to See Complete Forum and Search --> : Forcing a JavaScript to abort
HiMyNameIs
08-30-2003, 05:16 PM
Is there any way to force a JavaScript to abort prematurely. Most languages have an abort() or exit() function that will stop the script or application in its tracks, no questions asked.
Is there something similar for JavaScript?
Khalid Ali
08-31-2003, 05:58 AM
yes just use
return false;
statement at the point where you want to stop the script from execution.
HiMyNameIs
08-31-2003, 05:57 PM
Won't this just exit the function?
I need to exit the WHOLE script.
lillu
09-01-2003, 06:15 AM
Hi,
This is what I found that may be of help to your problem:
http://p2p.wrox.com/archive/javascript/2002-04/25.asp
Khalid Ali
09-01-2003, 09:06 AM
Originally posted by HiMyNameIs
Won't this just exit the function?
you are right it will.
I think you may have to re-visit the logic in your js program....