即:表单提交多次 [英] ie : form submits happening multiple times

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

问题描述

我要去面对自己。

我有一个单一表格的页面。

常规旧的HTML。

有几个复选框和文本框以及两个提交按钮(我希望'不是问题......)

表单提交给自己(我控制后端,所以我处理它)


当我点击提交按钮时,表单已提交,我的页面返回了提交的表单。某个地方的文字。

如果它完成加载,它会自动再次提交。

使用数据包观察程序我可以看到请求似乎是相同的。两者都使用POST并包含相同的内容数据。

在新请求加载完成之前,它会加载页面第三次,这次是使用GET请求而没有内容数据。


这是非常有害的。它似乎只发生在ie(虽然我只测试了ie6)。页面上没有javascript。


更多注释:

该页面位于特权区域,因此AUTH标头被发送(它''' s在那里并且验证正常,200 ok返回到每个请求而没有挑战)

页面都标记为无缓存


有人听说过这个吗?我在网上快速检查了一下,然后回到新闻组,但没有解决任何问题。

I''m going to stab myself in the face.
I have a page with a single form.
Regular old html.
There are a few checkboxes and textboxes and and two submit buttons (I hope that''s not the issue...)
The form submits to itself (I control the backend so I handle it)

When I click the submit button, the form is submitted and I get my page back with a "form submitted" text in a certain place.
As SOON as it finishes loading, it automatically submits itself again.
Using a packet watcher I can see that the request seems to be identical. Both use POST and contain the same content data.
Before that NEW request has finished loaded, it loads the page a THIRD time, this time using a GET request and no content data.

This is very aggrivating. It only appears to happen in ie (I''ve only test on ie6 though). There is no javascript on the page.

A few more notes:
The page is in a privleged zone so the AUTH header gets sent (it''s in there and validated just fine, the "200 ok" is returned to each request without a challenge)
The pages are all marked as no-cache

Anyone heard of this? I gave a quick check on the net and got one hit back to a newsgroup but nothing was resolved.

推荐答案

我不知道你的问题在哪里或者什么没有你的代码,所以请发布。


谢谢,死亡
I can''t tell where or what your problem is without your code, so please post it.

Thanks, Death


这只是一个基本形式?
It''s just a basic form?
展开 | 选择 | Wrap | 行号


在你的第82行代码中,你的id中缺少 qoute。


谢谢,死亡


PS - 如果你愿意的话提交给自己的表单你必须给它动作属性。


action =" nameOfFile.html"
On your 82nd line of code you''re missing a " qoute in your id.

Thanks, Death

PS - if you want the form to submit to itself you have to give it the action attribute.

action="nameOfFile.html"


这篇关于即:表单提交多次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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