刷新/双重提交问题 [英] Refresh/Double Submit problem

查看:78
本文介绍了刷新/双重提交问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在html表单中提交双重问题。

我使用PHP作为服务器端脚本语言,我找到了a

表示捕获第二个表单提交,而第一个表单

提交仍在进行中。基本上,我可以使用会话来确认第一次提交是否有效并拒绝后续提交。


***我不想尝试任何客户端侧面解决方案(如禁用

提交按钮)在屏幕上点击F5将重新发布数据

再次。


我的问题是:

(*)如果我向浏览器发送某种输出告诉用户

前一个会话处于活动状态,那么我该如何确保第一个

表单提交的输出在浏览器上显示给用户

窗口?


我试过,打印喜欢的消息 - 请等一下。但不知何故第一个表格

提交'的输出没有打印...我猜测浏览器关闭

连接第二次提交后的输出'并且

首次提交无处可以发送输出。


我希望,我能够清楚地表达我的问题。


请帮忙!


Raghu

解决方案

5月7日,下午4:44,ABC< raghuana ... @ gmail.comwrote:





我有在html表单中提交Double的问题。

我使用PHP作为服务器端脚本语言,我发现

意味着捕获第二个表单提交而第一个表格

提交仍在进行中。基本上,我可以使用会话来确认第一次提交是否有效并拒绝后续提交。


***我不想尝试任何客户端侧面解决方案(如禁用

提交按钮)在屏幕上点击F5将重新发布数据

再次。


我的问题是:

(*)如果我向浏览器发送某种输出告诉用户

前一个会话处于活动状态,那么我该如何确保第一个

表单提交的输出在浏览器上显示给用户

窗口?


我试过,打印喜欢的消息 - 请等一下。但不知何故第一个表格

提交'的输出没有打印...我猜测浏览器关闭

连接第二次提交后的输出'并且

首次提交无处可以发送输出。


我希望,我能够清楚地表达我的问题。


请帮忙!


Raghu



我不认为这是可能的..如果你只想要要做服务器端

然后帖子必须完成,结果页面必须加载

才能输出任何内容到屏幕..因为你能够

看看是否有两个提交为什么不把它们带到一个错误

页面说回去并且这次不要再提交两次..


Flamer。


5月7日上午10点08分,flamer die.s ... @ hotmail.com

< die.s ... @ hotmail.comwrote:


5月7日下午4:44,ABC< raghuana ... @ gmail.com写道:





我在html表单中提交双重问题。

我使用PHP作为服务器端脚本语言,我找到了a

表示捕获第二个表单提交,而第一个表单

提交仍在进行中。基本上,我可以使用会话来检查第一次提交是否有效并拒绝后续提交。


***我不想尝试任何客户端解决方案(例如禁用

提交按钮)作为点击屏幕上的F5将再次重新发布数据



我的问题是:

(*)如果我向浏览器发送某种输出告诉用户

前一个会话处于活动状态,那么我如何确保在浏览器上向用户显示第一个

表单提交的输出

窗口?


我试过,打印消息如下 - 请稍候。但不知何故第一个表格

提交'的输出没有打印...我猜测浏览器关闭

连接第二次提交后的输出'并且

首次提交无法发送输出。


我希望,我能够清楚地表达我的问题。


请帮忙!


Raghu



我认为不可能..如果你只想做服务器端

然后帖子必须完成,结果页面必须加载

才能输出任何内容到屏幕..因为你能够

看看是否有两个提交内容为什么不把它们带到一个错误

页面说回去并且这次不要再提交两次..


Flamer.-隐藏引用的文字 -


- 显示引用的文字 -






如果我有一些需要时间的数据库插入/更新怎么办?

如果我把他带到

这个解决方案听起来很原始然后再说一遍一个错误页面,然后上一个输出没有来到浏览器i

假设!


5月7日,6:上午44点,ABC< raghuana ... @ gmail.comwrote:


我有在html表单中提交双重问题。



您是否尝试使用JavaScript禁用提交按钮?


祝你好运

Martin

------------------------------------------- -----

bash基础上的在线会计

在线Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at

------------- -----------------------------------

m2m服务器软件有限公司 http://www.m2m.at


Hi,

I have a problem with Double submission in html forms.
I am using PHP as the server side scripting language, i have found a
means to capture the second form submission while the first form
submission is still in-progress. Basically, i can use sessions to
check if the first submission is active and reject subsequent submits.

***I do not want to try any client side solution(such as disabling
submit button) as hitting F5 on the screen will re-post the data
again.

My question is :
(*) if i send some kind of output to the browser telling the user
that a previous session is active, then how do i ensure that the first
form submission''s output is displayed to the user on the browser
window?

I tried, print messages like- Please wait. But somehow the first form
submission''s output is not printed...I am guessing the browser closes
the connection after the second submission''s output is received and
first submission has no where to send the output.

I hope, i have been able to express my problem clearly.

Please help!

Raghu

解决方案

On May 7, 4:44 pm, ABC <raghuana...@gmail.comwrote:

Hi,

I have a problem with Double submission in html forms.
I am using PHP as the server side scripting language, i have found a
means to capture the second form submission while the first form
submission is still in-progress. Basically, i can use sessions to
check if the first submission is active and reject subsequent submits.

***I do not want to try any client side solution(such as disabling
submit button) as hitting F5 on the screen will re-post the data
again.

My question is :
(*) if i send some kind of output to the browser telling the user
that a previous session is active, then how do i ensure that the first
form submission''s output is displayed to the user on the browser
window?

I tried, print messages like- Please wait. But somehow the first form
submission''s output is not printed...I am guessing the browser closes
the connection after the second submission''s output is received and
first submission has no where to send the output.

I hope, i have been able to express my problem clearly.

Please help!

Raghu

I dont think it is possible.. if you only want to do it server side
then the post has to complete and the resulting page has to load
before you can output anything to the screen.. since you are able to
see if there has been two submissions why not take them to an error
page saying go back and dont hit submit twice this time..

Flamer.


On May 7, 10:08 am, "flamer die.s...@hotmail.com"
<die.s...@hotmail.comwrote:

On May 7, 4:44 pm, ABC <raghuana...@gmail.comwrote:


Hi,

I have a problem with Double submission in html forms.
I am using PHP as the server side scripting language, i have found a
means to capture the second form submission while the first form
submission is still in-progress. Basically, i can use sessions to
check if the first submission is active and reject subsequent submits.

***I do not want to try any client side solution(such as disabling
submit button) as hitting F5 on the screen will re-post the data
again.

My question is :
(*) if i send some kind of output to the browser telling the user
that a previous session is active, then how do i ensure that the first
form submission''s output is displayed to the user on the browser
window?

I tried, print messages like- Please wait. But somehow the first form
submission''s output is not printed...I am guessing the browser closes
the connection after the second submission''s output is received and
first submission has no where to send the output.

I hope, i have been able to express my problem clearly.

Please help!

Raghu


I dont think it is possible.. if you only want to do it server side
then the post has to complete and the resulting page has to load
before you can output anything to the screen.. since you are able to
see if there has been two submissions why not take them to an error
page saying go back and dont hit submit twice this time..

Flamer.- Hide quoted text -

- Show quoted text -

Hi,

What if i have some DB Inserts/Updates which takes time ?
That solutions sound little primitive and then again, if i take him to
an error page, then the previous output does not come to the browser i
suppose!


On May 7, 6:44 am, ABC <raghuana...@gmail.comwrote:

I have a problem with Double submission in html forms.

Did you try disabling the submit button using JavaScript?

good luck
Martin
------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at


这篇关于刷新/双重提交问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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