[thelist] Sharing data between ASP and JavaScripts

Hassan Schroeder hassan at webtuitive.com
Wed Feb 26 11:37:01 CST 2003


David.Cantrell at Gunter.AF.mil wrote:

>>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.
>
> You can't.
/          Once the client hands off processing to the server, the only
> thing it can do is wait for a response. It can't interact with a running
> process on the server.
>
> Doing anything else would require a stateful connection ...

Well, maybe :-)

I know nothing about ASP, but if I were trying to do this in a
servlet/JSP environment, I'd consider:

1) frames -- launch this long-running process from a framed page
    where there's a separate "control panel" to hold the giant red
    STOP button :-)

2) server push -- haven't seen this used in a long time, but that
    would allow you to deliver a preliminary ("please wait...") page
    that could also contain a STOP button. Unless terminated by the
    button push, the process would then overwrite the wait page with
    the query results.

In either case, pressing the STOP button requests a process to set
the variable your `do..` loop is testing for and return the "what
now?" page.

Also, neither of these approaches depends on JavaScript.

FWIW!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.






More information about the thelist mailing list