exiting javascript?
um, when using cgi exit will end the script/loop. what's a similiar command in javascript?
i tried using break, is there a trick to using it?
um, when using cgi exit will end the script/loop. what's a similiar command in javascript?
i tried using break, is there a trick to using it?
Mark Hensler posted this at 06:55 — 21st November 2000.
He has: 4,048 posts
Joined: Aug 2000
this works for me... IE5 win98
<html>
<body>
<input name=stuff type=text>
<script language=javascript>
<!--
for (i=0;i<10;i++) {
if (i==5) {
break;
}
else {
stuff.value += i;
}
}
//-->
</script>
</body>
</html>
Mark Hensler
If there is no answer on Google, then there is no question.
fairhousing posted this at 08:38 — 21st November 2000.
They have: 1,587 posts
Joined: Mar 1999
k, thx i'll give it a try.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.