Re: Possibility of two output windows, and interrupted transfers.
Benjamin M. Hill (Benjamin.M.Hill@dartmouth.edu)
15 Mar 98 01:34:33 EST
Old thread, I know, but it got me thinking, and I got it to work.
When launching the big script, it can print out a button that =
submits a form, with a hidden variable of the process's ID number. =
($$ in perl, being a newbie, I had to look that one up) The form =
goes to a "killing" perl script, that then kills whatever PID =
number it gets.
So it works, with the time-consuming script generating a big =
flashing button that says "Press here to stop this script," and if =
the user presses it, it goes to the kill script which kills the =
process, and prints out "Process Killed" I'm not up to speed =
enough with Javascript, but I'm almost positive an "onLeave" could =
do the exact same thing.
-Benjamin
--- Robin wrote:
So maybe using the onLeave event handler to send your script
some data telling it that it can die in peace would work. I'm not =
fluent
with javascript so this has to be thoroughly tested.
o Doesn't the server process that served the client die if the =
latter
presses the stop button ? If not well it's a pity as many processes =
could
be saved this way, but if it is then you could try to find out the =
process
that is serving your client and die if it dies.
And after this hypotheses, there might be simple bluff: how about =
writing
in nice but unmissable red letters that if the client wishes to =
STOP, he
mustn't press the browser's stop button as it will be ineffective =
due to
some design flaw in the way browsers handle certain types of =
scripts
blablabla, and offer as an alternate solution a nice input button =
called
"stop" that'll call a small script that'll simply kill your time =
consuming
script and send back a small page saying that it has stopped ?
Ok that's a big lie, and the implemetation isn't as easy as it =
seems, but
it is feasible.
--- end of quote ---