[jQuery] Re: how to stop jquery execution

2008-07-21 Thread Gordon
for (var x = 0; (x max !aborted); x++) { // loop } attach this to the onclick event of a button: aborted = true; On Jul 20, 8:30 am, robert123 [EMAIL PROTECTED] wrote: I have jquery for loop it runs for about an hour doing some processing before stopping. In the for loop it execute

[jQuery] Re: how to stop jquery execution

2008-07-20 Thread Syam
Try checking for a status variable in the for loop and change that variable on button click. On Jul 20, 12:30 am, robert123 [EMAIL PROTECTED] wrote: I have jquery for loop it runs for about an hour doing some processing before stopping. In the for loop it execute alot of jquery Ajax post

[jQuery] Re: how to stop jquery execution

2008-07-20 Thread ..:: sheshnjak ::..
Hi, you can envelope your for loop in an if statement to test for boolean variable that will control execution like this: var loopControl=true; for (var=startvalue;var=endvalue;var=var+increment){ if(loopControl){ // your loop code goes here } } and now, if you set