【问题标题】:iframe with a php form not working in IE带有 php 表单的 iframe 在 IE 中不起作用
【发布时间】:2013-04-09 18:00:29
【问题描述】:

我更新了信息,以便您更好地了解:

当用户在 IE 中提交表单时,我有一个带有 PHP 表单的 iframe,它似乎没有发布数据。它适用于 Firefox 和 Chrome,但不适用于 IE 7、8 和 10。

发生的情况是,当我们在 IE、Firefox、Chrome 和 Safari 中的服务器上测试 iframe php 表单时,它工作正常,但是当客户端将代码上传到他们的服务器并在 IE 上测试时,它对他们不起作用。奇怪的是我可以在他们的服务器上测试 iframe php 表单,它在所有使用 Windows 7 和 XP 的浏览器上都可以正常工作。客户端在Windows 7和XP的IE7、8、10中测试iframe php代码。

还有一件更重要的事情要知道。 iframe html 页面仍然托管在我们的服务器上,因为客户端没有在他们的服务器上使用 php。

这是 iframe 标记

<iframe id="iframe" frameborder="0" src="FullURL/reportBuilderForm.html"></iframe>

这是 iframe 代码:

<!doctype html>
<!--[if IE 7]><html class="ie7" lang="en"><![endif]-->
<!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html lang="en"><!--<![endif]-->
<link rel="stylesheet" href="styles.css" type="text/css" media="screen" />
<head>
<meta charset="utf-8" />
<title>Website</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body id="reportForm">
<div class="row">
    <form  onsubmit="" name="report_form" id="report_form" action="generatePDF.php" method="POST" target="_blank">

    <div class="sixcol">
        <label class="blue">
            <input type="checkbox" name="leadership" id="leadership" class="noMargin"/>
            Leadership &mdash; Chairman's Messages</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="company" id="company" class="noMargin"/>
            Company</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="performance" id="performance" class="noMargin"/>
            Performance</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="solutions" id="solutions" class="noMargin"/>
            Solutions</label>
        <br>
        <br>
    </div>
    <div class="sixcol last">
        <label class="blue">
            <input type="checkbox" name="relationships" id="relationships" class="noMargin"/>
            Relationships</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="culture" id="culture" class="noMargin"/>
            Culture</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="responsibility" id="responsibility" class="noMargin"/>
            Responsibility</label>
        <br>
        <br>
        <label class="blue">
            <input type="checkbox" name="leadershipBoard" id="leadershipBoard" class="noMargin"/>
            Leadership &mdash; Board &amp; Sr. Management</label>
        <br>
        <br>
    </div>
    <div class="clear"></div>
    <hr />
    <input name="generateReportBtn" class="generateBtn" type="submit" tabindex="4" value="generate PDF" id="submit"/>
    </form>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
</body>
</html>

【问题讨论】:

  • 一个人不会简单地创建一个与 Internet Explorer 一起工作的网站
  • 人们不会简单地创建一个暗示 Internet Explorer 有效、曾经有效或将永远“有效”的句子。
  • 能否请您附上表格声明的顶部?此外,如果您可以包含 iframe 标记,那么我们也可以看到这一点。谢谢!
  • @Revent - 我刚刚做到了。我试图弄清楚为什么代码一直被切断。
  • 以正确的 HTML 开头,即非常有意义。 css 和 js 应该在 head 标签内。并尝试更好地描述什么不起作用顺便说一句,您使用的是会话还是 cookie?

标签: php forms internet-explorer iframe


【解决方案1】:

感谢 cmets,但我们最终采用了不同的解决方案。我们决定在我们的服务器上托管带有 iframe 和 php 表单的页面。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-27
    • 2015-07-09
    • 1970-01-01
    • 2013-06-27
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多