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 loopControl=false (or loopControl=0) your loop
will stop at the very next iteration. I hope this was the solution you
needed.

On 20 srp, 09:30, 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 statement.
>
> As the execution is quite long, I might want to stop the javascript
> sometime using another button in the form, where the button will can
> another javascript to stop it.
> But I am not sure what type of javascript can stop the jquery from
> processing.
>
> Another help on this, thank you.
>
> http://www.genericsmed.comhttp://www.generics.ws

Reply via email to