1、js弹出框:
function toAddOrUpdateVersions(id){
var url="${ctx}/xnjc/xnjc_toAddOrUpdateVersions.action?id="+id+"";
var returnValue=window.showModalDialog(url,window,"dialogWidth=800px;dialogHeight=500px;center:1;scroll:auto;status:yes");
if(returnValue=="true"){
window.location.reload();
}
}
2、在弹出框中保存成功后,删除弹出框
前台页面:
<head><script type="text/javascript">
window.name='mywin';
</script>
</head>
<body>
<form name="form2" id="form2" action="${ctx}/xnjc/xnjc_addZgtzVersions.action" method="post" target="mywin">
后台页面:
public void addZgtzVersions() throws Exception{
Map p=this.commonDealBefore();
xnjcService.addVersion2(p);
StringBuffer sb = new StringBuffer("");
sb.append("<script language='javascript'>\n");
sb.append(" window.returnValue='true';\n");
sb.append(" window.close();\n");
sb.append("</script>");
this.commonDealStringForResponse(sb.toString());
}