ju***@scripteasy.com (Julia) writes:
Is there some way in Javascript to abort a script...not just a
function, but the entire script?
You can make an error or throw an exception.
Examples:
Error:
null.dummy;
Exception
throw "exit";
If you don't want the browser to complain, you need to catch the
exception at the top. Some browsers allow you to catch an error
by defining an "onerror" handler on the document or window (don't
remember which).
Exceptions are not available in IE 4 or Netscape 4 (or contemporary
browsers).
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'