Request | page | string | request | The string Mode window is a convenient way to extend the current page, but the ASPX file can only be invoked as an IFRAME of the HTM file. At the same time, the request string is also a convenient way to transfer the values between pages, so how to put the two together, that is, how to use the request string to pass the value to the modal window open aspx page?
We can use JS script to achieve this function:
1. Call page code:
<script language= "JavaScript" >
function Getcorrelativeitemid ()
{
RDL = Document.getelementsbyname ("Rdlsystem");
input = document.getElementById ("Txtcorrelativeitem");
Sysid = "";
for (i = 0; i < rdl.length; i++)
{
if (Rdl[i].tagname = = "INPUT")
{
if (rdl[i].checked)
{
Sysid = Rdl[i].value;
}
}
}
arg = window.showModalDialog ("searchitemc.htm?sysid=" +sysid,window, "resizable:1;");
if (arg!=null)
{
Input.value = arg;
}
}
</script>
2. Code for the open HTM file (searchitemc.htm):
<HTML>
<HEAD>
<script language= "JavaScript" >
function ResolveUrl ()
{
var frm = window.frames[0];
Frm.location = location.tostring (). Replace ("c.htm", "c.aspx");
}
</script>
</HEAD>
<body style= "margintop:0;marginleft:0;marginright:0;marginbottom:0" onload= "ResolveUrl ()" >
<table align= "left" cellpadding= "0" cellspacing= "0" width= "100%" height= "100%" id= "Table1" >
<tr>
<TD valign= "Top" width= "100%" height= "100%" ><iframe id= "Ifmain" border= "0" width= "100%" height= "100%" > </iframe></td>
</tr>
</table>
</BODY>
</HTML>
3.Aspx file (searchitemc.aspx) code:
request.querystring["Sysid"]. Trim ();