了解 showModalDialog
我有一个购物车页面,其中“信用卡付款”按钮会弹出一个弹出窗口:
window.showModalDialog(ccPaymentURL, null, "dialogwidth: 450px;dialogheight: 370px; center: yes; resizing: yes");
加载到此弹出窗口(位于不同域中的 SSL 页面)中的 URL 会收集 CC 信息、处理费用并(通过在原始站点上运行的 Web 服务)将订单标记为“已付款”。
此时,弹出窗口应该刷新父级 - 让父级重新查询数据库并发现订单已付款并重新显示更新的订单状态。
我的集成测试显示一切正常。但实际上......一些用户在某处破坏了链条,并且父页面无法重新加载。我怀疑这与不同的浏览器(和/或浏览器设置)如何对待 showModalDialog 有关,因此我正在寻找在尝试实现此类用例时可能出错的已知事物的概述。
谢谢
I have a shopping cart page where my 'Pay By Credit Card' button fires a popup:
window.showModalDialog(ccPaymentURL, null, "dialogwidth: 450px; dialogheight: 370px; center: yes; resizable: yes");
The URL loaded into this popup (an SSL page that sits in a different domain) collects the CC info, processes the charges and (via a webservice running on the orginal site) marks the order as 'Paid'.
At this point, the popup is supposed to refresh the parent - letting the parent requery the db and find that the order's been paid and re-display the updated order status.
My integration tests show everything working correctly. But in reality...some users are breaking the chain somewhere and the parent page is failing to reload. I suspect it has to do with how different browsers (and/or browser settings) treat showModalDialog so i'm looking for an overview of known things that can go wrong when trying to implement this sort of use case.
thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是否存在某种跨域安全策略来阻止整个链条的发生?
或者弹出窗口中的错误处理如何?如果验证成功或失败,它是否会处理所有情况?
Could there be some sort of cross-domain security policy that's preventing the complete chain from happening?
Or how's the error handling from within your pop-up? Does it handle every case for what happens if the verification occurred successfully or not?