[thelist] Sharing data between ASP and JavaScripts

Jerry Scannell JerryScannell at cox.net
Tue Feb 25 18:11:01 CST 2003


You hit what I want to do right on the head.  I don't want to give up so
easy, though.

I have an idea.  If I have a Session() variable that I can set to 1 if the
user wishes to quit, then I can test for that in my do ... loop.  The only
problem is how to set the Session() variable inside a javascript or
vbscript.  Do you have any idea here?  I know that you can share data from
ASP to javaScript but can you go the other way??  For instance, assume I
have an ASP variable.  In javascript I can do:

<script language="javascript">
function funcName()
   var s = <%=Session("varname")%>;
   return true;

How about going the other way? If I could set a session variable from within
a javascript I would be all set.  Perhaps with remote scripting???

----- Original Message -----

From: <David.Cantrell at Gunter.AF.mil>
To: <thelist at lists.evolt.org>
Sent: Tuesday, February 25, 2003 10:44 AM
Subject: RE: [thelist] Sharing data between ASP and JavaScripts

> > 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
> 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
> no longer connected" then it could kill the process, but it doesn't do
> This is because every time you click a button or a link in the browser you
> make a *new* request to the server.
> HTH,
> -dave
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list