父页面:
var random = Math.random();
var vValue= window.showModalDialog ("url&Random="+random, "","dialogWidth:660px; dialogHeight:300px; help:no; scroll:yes; status:yes");
if(vValue=="NO"){
return;
}else if(vValue=="YES"){
window.location.href="<%=request.getContextPath()%>/operation/kwapgl/sckhsjnd.jsp?pcbh=<%=pcbh%>";
}
子页面:
设置可提交
<base target="_self" />
//window 返回值
function doInit()
{
window.returnValue="NO";
}
<body topmargin="5" onload="doInit()";>
//提交自己查询
//查询
function selectInfo(){
document.gongzhong.action="<%=request.getContextPath() %>/operation/kwapgl/select_fzlist.jsp";
gongzhong.submit();
}
//提交到action 中处理后跳转父页面并关闭子窗口
document.gongzhong.action='<%= request.getContextPath() %>/action/fzkcapAction?flg=addgroup'
gongzhong.target="workspace";
window.returnValue="YES";
gongzhong.submit();
window.close();
}
分享到:
相关推荐
关于struts2里用javascript刷新window.showModalDialog的父页面
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
showModalDialog刷新窗口的例子
javascript中showModalDialog子页面值赋给父页面 并解析json格式的值
ShowModalDialog父窗体向子窗体传值
主页面用window.showModalDialog的时候,如果直接打开其它系统的页面,这时候别人的页面在window.returnValue=1;这样返回值的时候,主页面是取不到返回值的,原因就是因为跨域了.
showModalDialog使用例子,父窗口向子窗口传递值,子窗口设置父窗口的值,子窗口关闭的时候返回值到父窗口 纯js 应用广泛 应用广泛
针对window.showmodaldialog弹出窗体无刷新的详细使用
本文实例讲述了JS中showModalDialog关闭子窗口刷新主窗口用法。分享给大家供大家参考,具体如下: 网上找了好长时间 大都是window.opener.location.reload(),等等 都不是我想要的 最后终于发现了一个 想知道的就往下...
在页面中使用了showModalDialog,但是在跳转链接时,不会在当前页执行,而是弹出一个新的页面。
原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,所以模态对话框会同时将selenium挂 起,selenium无法选中模态对话框,直至超时。
如:对话框赋给父页面的值 步骤一:父页面CS文件Page_load中执行脚本(打开对话框) Button1.Attributes.Add("onclick","window.showModalDialog('../Dialog/DialogForm.aspx',window)"); 步骤二:父页面页面脚本函数...
div层实现showModalDialog
showModalDialog参数传递和获
在B窗口中添加数据,提交后,要求B窗口自关闭,然后刷新A窗口(父) 代码如下: [removed] function openSubWin() { window.showModalDialog(‘b.html’, ‘newwindow’, ‘height=500, width=400, top=0, left=0, ...
代码如下: Code highlighting produced by Actipro CodeHighlighter (freeware)... //使用浏览器刷新功能 window.opener.location.reload(); 使用showModalDialog方法 window.returnValue = ‘refresh’;
页面弹窗实现用的showModalDialog方法
showModalDialog和showModelessDialog使用心得
NULL 博文链接:https://crabdave.iteye.com/blog/269954
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...