[thelist] Sharing data between ASP and JavaScripts

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Tue Feb 25 09:44:01 CST 2003

> I have a database loop that's running some ASP code.  I would
> like the user to be able to cancel the operation cleanly.
> What I'm looking to do is perhaps have a "cancel" button
> whose onClick event sets a flag.  I could then test the flag
> at the end of my do ... loop and gracefully exit.  I can't
> seem to think of a scheme where a piece of data that is set
> by a client operation can be tested from within an ASP loop.

Sounds like you want the user to click a URL in their browser and run an ASP
process on the server, and while that ASP process is running have the user
cancel it, right?

Nope, can't do it that way, at least not that I can see. Once you kick off
the ASP process you will pretty much have to wait until it is finished,
unfortunately. If there were some way for IIS to register that "this user is
no longer connected" then it could kill the process, but it doesn't do that.
This is because every time you click a button or a link in the browser you
make a *new* request to the server.


More information about the thelist mailing list