简体   繁体   English

如何从JSP中的Popup刷新时禁用父页面上的警报

[英]How to disable alert on parent page on refresh from Popup in JSP

From a pop up JSP page, on close I am refreshing the parent page. 从关闭的JSP弹出页面中,我正在刷新父页面。

POPUP page is created by: POPUP页的创建者:

top.f_dialogOpen(url, 'MYPOPUPPAGE','width=1200px, height=470px');

JS to close the popup and refresh the parent page: JS关闭弹出窗口并刷新父页面:

function closePopUp()
{
    top.frames.location.reload(false);
    top.f_dialogClose();
}

This refreshes the parent page but before refreshing following JS alert appears: 这将刷新父页面,但在刷新之前会出现以下JS警报:

在此处输入图片说明

Can I disable this alert? 我可以禁用此警报吗? I dnt want this alert to appear as I refresh the parent page 我不希望在刷新父页面时出现此警报

Thanks Roberto, based on your recommended link, Just changing window.location in JavaScript is dangerous because the user could still hit the back button and resubmit the post, which could have unexpected results (such as a duplicate purchase). 感谢Roberto,根据您的建议链接,仅更改JavaScript中的window.location是危险的,因为用户仍然可以按“后退”按钮并重新提交帖子,这可能会导致意外结果(例如重复购买)。 PRG is a much better solution PRG是更好的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM