Page 1
<title></title>
<script type= "Text/javascript" >
function Open_windows_and_get_selectedinfo (Openwindow, control, control2) {
var str = window.showmodaldialog (openwindow, window, "DIALOGWIDTH=740PX;DIALOGHEIGHT=600PX;CENTER=YES;HELP=NO; Resizable=no;status=no ");
if (!STR)
Return
document.getElementById (Control). Value = Str[0];
document.getElementById (control2). Value = Str[1];
}
</script>
<body>
<form id= "Form1" runat= "Server" >
<div id= "AutoSuggest" style= "WIDTH:160PX;FONT-SIZE:12PX;" ><ul></ul></div>
<div>
<input id= "txtactive" runat= "Server" readonly= "readonly"/>
<input type= "button" id= "selectactive" runat= "Server" onclick= "Javascript:open_windows_and_get_selectedinfo (' 2. html ', ' hfactive ', ' txtactive ') "value=" ... "/>
<asp:hiddenfield id= "hfactive" runat= "Server"/>
</div>
</form>
</body>
Page 2
<base target= "_self" >
<title></title>
<script type= "Text/javascript" language= "JavaScript" >
function Dbclick_return_and_close (Strid, strvalue) {
Alert ("Execute this method!") ");
var str = new Array (Strid, strvalue);
Window.returnvalue = str;
Window.close ();
}
</script>
<body>
<div>
<a href= "#" onclick= "Javascript:dbclick_return_and_close (' 1 ', ' aaaaaaa ');" > Click this line to return the value to the original page </a>
</div>
</body>
JS pop-up window pass value