我可以跨域发布简单模式联系表单吗?

发布于 2024-09-16 17:38:01 字数 421 浏览 4 评论 0原文

我在此网站上使用 SMCF Wordpress 插件: http://fingelly.com/

如您所见使用 ajax 发布表单字段以获取邮件,然后更新模式。

该网站上的一些导航选项会将您带到第 3 方 IDX(房地产列表)提供商。例如,单击标记为代理的选项卡,URL 更改为 fingelly.idxre.com...

如您所见,该 html 是可自定义的...我曾尝试将相同的简单模式联系表单添加到我的模板中,但遇到了问题是因为我无法从其他域使用 ajax 发布到我的 wordpress 驱动的网站。

我理解这个限制是出于安全原因以防止 xss。在这种情况下,您建议如何解决这个问题?

现在我们只是删除了联系人选项卡。

I'm using the SMCF Wordpress plugin on this site: http://fingelly.com/

As you can see it uses ajax to post the form fields to get mailed and then updates the modal.

Some of the nav options at the site take you to a 3rd party IDX (real estate listings) provider. For example click on the tabs marked agents and the url changes to fingelly.idxre.com...

As you can see the html is customizable there... I had tried adding the same simple modal contact form to my template there but encountered a problem because I cannot post using ajax to my wordpress driven site from this other domain.

I understand this limitation is for security reasons to prevent xss. How would you suggest working around it in this case?

For now we've simply removed the contact tab.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

—━☆沉默づ 2024-09-23 17:38:01

如果您只需要向服务器发送信息而不用担心响应,则可以在页面上创建一个隐藏的 iframe 并将数据发布到那里。如果数据适合 GET,您还可以进行 JSONP 调用。

If you just need to send information to the server and not worry about the response, you create a hidden iframe on the page and post the data there. You could also make a JSONP call if the data would fit in a GET.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文