【发布时间】:2010-03-17 13:18:30
【问题描述】:
我有一个表单,可以将值发布到向导中的页面。当我在 Iframe 中加载此表单时,在 Firefox 中一切正常,它将使我进入向导的第二步并维护我填写的值。当我在 Internet Explorer 中测试时,我没有进入第二步步骤,而不是它让我回到向导的第一步,所有字段都为空白。当我在 Fiddler 中检查这一点时,我发现当我从 Firefox 在 Iframe 中发布表单时,与 Internet Explorer 相比,我得到了不同的响应。我怎样才能使它适用于所有浏览器?我做错了什么?
这是我从 Fiddler 那里得到的:
火狐
帖子:
Ressult Protocol Host URL Body Caching Content-Type Process Comments Custom
1 302 HTTP www.dmg.eu /brugman/budgetplanner/aanmelden.php 0 no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Thu, 19 Nov 1981 08:52:00 GMT text/html; charset=UTF-8 firefox:6116
获取:
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
2 200 HTTP www.dmg.eu /brugman/budgetplanner/ 40.677 no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Thu, 19 Nov 1981 08:52:00 GMT text/html; charset=UTF-8 firefox:6116
Internet Explorer
帖子:
Result Protocol Host URL Body Caching Content-Type Process Comments Custom
73 302 HTTP www.dmg.eu /brugman/budgetplanner/aanmelden.php 0 no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Thu, 19 Nov 1981 08:52:00 GMT text/html; charset=UTF-8 iexplore:536
获取:
Result Protocol Host URL Body Caching Content-Type Process Comments Custom
74 302 HTTP www.dmg.eu /brugman/budgetplanner/ 0 no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Expires: Thu, 19 Nov 1981 08:52:00 GMT text/html; charset=UTF-8 iexplore:536
希望有人知道差异是什么:)。
编辑:(更多信息......)
html
<%@ CODEPAGE=65001 %>
<% Response.Charset = "utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="index,follow,noodp" />
<title>Hey</title>
</head>
<body class="body">
<iframe width="800px" height="1024" src="http://www.dmg.eu/brugman/budgetplanner/aanmelden.php">
</iframe>
</body>
</html>
【问题讨论】:
-
您是如何提交表单的?使用
enter键还是鼠标键?当按下enter键时,MSIE 往往会做一些完全出乎意料的事情。此外,响应标头并不是真正令人感兴趣的,调试请求标头(发送了哪些参数?等)和 PHP 代码(执行了哪些行,哪些行不执行?等)将产生有关该问题的更有趣的见解。 -
我正在使用提交按钮,我正在点击该按钮。
-
好的,如果您按要求添加更多调试信息,那么我们也许能够指出原因。只有响应标头并没有提供太多的工作。目前还不清楚请求了什么以及代码实际做了什么:)
-
这很简单,我有一个表单,当我在 IE 的 iframe 中加载该表单时,它不会让我进入该过程的第二步,但在 Firefox 中它会。您还需要什么信息??
-
您需要在 HTTP sn-ps 中包含 LOCATION 标头的内容才能使用。 (Fiddler 的“复制 > 简洁摘要”选项应该会自动为您执行此操作)。 FWIW,您不应该在响应中返回预检查或后检查指令,但这是一个 PHP 错误。
标签: internet-explorer firefox forms fiddler