`
wangjia1001
  • 浏览: 15414 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

showModalDialog 刷新父页面

JSP 
阅读更多
父页面:
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();
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics