dialogWrapper.jspページ作成


親ページ

function queryList(){
	  var url="./xtwh/personSearch.do?method=personSearch&go=dialogWrapper";
	  
	  url = url.replace("?","%3f");
	  url = url.replace(/\&/g,"%26");
	  url = url.replace(/\=/g,"%3d");
	  var obj = showModalDialog("../dialogWrapper.jsp?url="+url,window,"dialogWidth:860px;dialogHeight:500px;scroll:no;status:no;");
	  
	  if (obj != undefined&&obj != null&&obj != "") {
		  //alert(obj);
		  var tmp=obj.split("|");           
		  $("#sys_person_info_id").val(tmp[0]);
		  $("#name").val(tmp[1]);
	  }
}

中間ページjspはWebContent,WebRootの下に置く

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<html>
<head>
<title> </title>
<meta http-equiv="Cache-Control" content="no-store"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<script type="text/javascript" >
function getTime(){
	setTimeout(settitle,300);
}

function settitle() {
	var child_document=frames["wrapper"].document;
	var child_title=child_document.title;
	if(child_title!=undefined&&child_title!=null&&child_title!=""){
		document.title=child_title;
	}
}
</script>
</head>
<body onload="getTime()"  >
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    <iframe name="wrapper" id="wrapper" width="100%" height="100%" frameborder="0" src="<%=request.getParameter("url")%>"></iframe>
    </td>
  </tr>
</table>
</body>

サブページ

function okRadio(id, name, sex) {
	var _returnvalue = id + "|" + name;
	parent.window.returnValue = _returnvalue;
	window.close();
}