【问题标题】:Thank you URL is not loading outside the form iframe谢谢 URL 没有在 iframe 表单之外加载
【发布时间】:2018-06-09 10:30:12
【问题描述】:

我在我的 wix 网站上嵌入了一个表单 - 它看起来像这样:

<script type="text/javascript" src="https://premier.formstack.com/forms/js.php/formname"></script>

但是感谢页面的 URL 一直在表单框架内加载。如何在提交时强制它加载到父页面上?

【问题讨论】:

  • 欢迎来到 Stack Overflow!请阅读How to Ask 页面并更新您的问题。
  • 我很困惑。我在这里没有看到任何<iframe> 标签,那么标题是什么意思?另外,我不知道您所说的“感谢页面 URL”是什么意思,在您的代码示例中没有类似的内容。
  • 这是表单的脚本 - 感谢页面在 formstack 的表单设置中指定.
  • 不知道这个奇怪的代码是从哪里来的——很抱歉这是我第一次使用堆栈溢出,显然我做错了什么! :)

标签: javascript html forms velo


【解决方案1】:

据我所知,您已嵌入 JavaScript,当我检查时,它基本上将表单添加到文档中。

document.write("<!DOCTYPE html>"+"\n");
document.write("<html  lang=\"\">"+"\n");
document.write("<head>"+"\n");
document.write("    <meta charset=\"utf-8\" />"+"\n");
document.write("    <title>Formstack</title>"+"\n");
document.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"/forms/style.css\" />"+"\n");
document.write("</head>"+"\n");
document.write("<body>"+"\n");
document.write("    <div id=\"error\" class=\"formError\"><strong>ERROR:</strong> It looks like we couldn\'t find a form with that URL. Please double-check the URL and try again. If you\'re still having trouble, try contacting the person who sent you this form. (Error ID: b15b76df14cf6527b8ee)"+"\n");
document.write("        "+"\n");
document.write("                <br /><br />"+"\n");
document.write("        <form class=\"formErrorBack\" action=\"\">"+"\n");
document.write("            <input type=\"button\" value=\"Back\" onclick=\"history.back()\" />"+"\n");
document.write("        </form>"+"\n");
document.write("                "+"\n");
document.write("    </div>"+"\n");
document.write("</body>"+"\n");
document.write("</html>"+"\n");
document.write(""+"\n");

但是你需要指定formname

例如,当我将其替换为 30_day_employee_review 时,您可以看到已加载的表单。

<script type="text/javascript" 
src="https://premier.formstack.com/forms/js.php/30_day_employee_review"></script>

干杯,欢迎来到 StackOverflow!

【讨论】:

  • 感谢 Sunil B N。我以 formname 为例 - 不在我的实际代码中。表单本身可以正常工作并正确显示。它是在 iframe 中加载并破坏一切的感谢页面。
  • “中断”是什么意思?它会干扰您的用户界面吗?页面挂起?您能否分享更多代码以了解究竟发生了什么。
  • 中断是指它在表单的 iframe 中加载一个新页面。问题是wix添加了我无法编辑的iframe,但我想我找到了解决方法。非常感谢您的帮助!
猜你喜欢
  • 2014-03-06
  • 2021-10-16
  • 2021-12-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-31
相关资源
最近更新 更多