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 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