我可以从浏览器中取消正在运行的服务器页面吗? [英] Can I cancel a running server page from the browser?

查看:58
本文介绍了我可以从浏览器中取消正在运行的服务器页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务器页面,它提供了一个带有取消的HTML页面。

上的按钮,但是这个服务器页面还没有完成,并且在完成之前运行了15-30秒的
进程。我希望浏览器用户能够在服务器进程完成之前终止页面
。我尝试的是

一个发出location.href ...的onClick事件。希望这会加载这个被引用的页面,等等。但是我发现浏览器等待

,直到服务器进程在执行location.href之前进行了编译。 ;。

有什么方法可以发出信号服务器停止处理,以便

我可以转到location.href。页;或者还有其他方式吗?


TIA,


拉里伍兹

I have a server page that has served an HTML page with a "Cancel" button on
it, BUT this server page has not completed and is running a 15-30 second
process before it completes. I want the browser user to be able to
terminate the page before the server process has finished. What I tried was
an onClick event that issued a "location.href..." in hopes that this would
load this referenced page, etc. but I have found that the browser waits
until the server process had compled before executing the "location.href".
Is there some way that I can "signal" the server to stop processing so that
I can go to the "location.href" page; or is there some other way?

TIA,

Larry Woods

推荐答案

" Larry Woods"写道:
"Larry Woods" wrote:

我有一个服务器页面,它上面有一个带有取消按钮的HTML页面,但是这个服务器页面还没有完成并且正在运行<在完成之前,需要15-30秒的过程。我希望浏览器用户能够在服务器进程完成之前终止页面......
...有什么办法可以发出信号吗?服务器停止处理,以便我可以转到location.href。页;或者是否有其他方式?

I have a server page that has served an HTML page with a "Cancel"
button on it, BUT this server page has not completed and is running
a 15-30 second process before it completes. I want the browser user
to be able to terminate the page before the server process has
finished...
...Is there some way that I can "signal" the server to stop
processing so that I can go to the "location.href" page; or is there
some other way?




您无法直接取消该请求。你能做的最好的就是让ASP

进程持续监控一些独立的实体(例如,一个会话变量或一个数据库中的
记录)。预先设定的条件

符合。取消请求仍然独立于原始的

请求,但原则上这应该是可能的。

-

Dave Anderson


将以每封邮件



You cannot directly cancel the request. The best you can do is have the ASP
process constantly monitor some independent entity (a session variable or a
record in a DB, for example), continuing only if some prearranged condition
is met. The cancel request would still be independent of the original
request, but this should be possible in principle.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of


500的费用阅读未经请求的商业电子邮件。使用

此电子邮件地址即表示同意这些条款。请不要直接联系

我或要求我直接与您联系以获取帮助。如果您的问题值得询问,那就值得发帖了。


500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it''s worth posting.



谢谢,戴夫。


为浏览器设置Session变量的最佳方法是什么?一个

弹出窗口(0 x 0)?


TIA,


拉里


" Dave Anderson" < GT ********** @ spammotel.com>在消息中写道

news:或************** @ TK2MSFTNGP10.phx.gbl ...
Thanks, Dave.

What would be the best way to set a Session variable for the browser? A
popup window ( 0 x 0 )?

TIA,

Larry

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
" Larry Woods"写道:
"Larry Woods" wrote:

我有一个服务器页面,它上面有一个带有取消按钮的HTML页面,但是这个服务器页面还没有完成并且正在运行<在完成之前,需要15-30秒的过程。我希望浏览器用户能够在服务器进程完成之前终止页面......
...是否有某些方法可以发出信号服务器停止处理,以便我可以转到location.href。页;或者是否有其他方式?
您无法直接取消该请求。您可以做的最好的事情是

I have a server page that has served an HTML page with a "Cancel"
button on it, BUT this server page has not completed and is running
a 15-30 second process before it completes. I want the browser user
to be able to terminate the page before the server process has
finished...
...Is there some way that I can "signal" the server to stop
processing so that I can go to the "location.href" page; or is there
some other way?
You cannot directly cancel the request. The best you can do is have the



ASP进程持续监视某个独立实体(例如,会话变量或数据库中的
a记录),仅在某些预先安排的情况下继续符合
条件。取消请求仍然独立于原始请求,但原则上这应该是可能的。

-
Dave Anderson

主动提供商业广告电子邮件将以


ASP process constantly monitor some independent entity (a session variable or a record in a DB, for example), continuing only if some prearranged condition is met. The cancel request would still be independent of the original
request, but this should be possible in principle.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of


这篇关于我可以从浏览器中取消正在运行的服务器页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆