some_guy 11 Posted February 8, 2010 Report Share Posted February 8, 2010 I have a for loop that loops 999 times as I need to amend the list that is being looped within the for.The listtotal parameter appears to be set at the beginning of the loop and isn't dynamically checked each loop (from my test) hence why I need to set a large loop to assure the loop loops enough terms, however, this method requires the ability to manually break the loop. I am sure I was able to break out a for by using if (a=then return value where value was just a nominal string. Now this isn't working, the return is definitely hit as have added a javascript alert() to the then statement, but the return is ignored and the loop goes round again. Any ideas? Quote Link to post Share on other sites
Aaron Nimocks 19 Posted February 8, 2010 Report Share Posted February 8, 2010 Instead of a loop use the while statement. Then when you want to break out change the value of a variable so it will no longer "while". Quote Link to post Share on other sites
some_guy 11 Posted February 9, 2010 Author Report Share Posted February 9, 2010 Instead of a loop use the while statement. Then when you want to break out change the value of a variable so it will no longer "while". Doh, of course !!! Thanks for reply Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.