Javascript
Response.Write ("<script language= ' JavaScript" >window.opener.location=window.opener.location.href;</ Script> ")
The first scenario is:
File a.htm
function OpenDialog (Url,param)
{
Return window.open (Url,param, "Dialogwidth:450px;dialogheight:450px;help:no;status:no");
}
File b.htm
<script language= "JavaScript" >
Function Js_do (val)
{
Self.opener.document.all.filename.value=val
}
</script>
The second option is:
File a.htm
<script language= "JavaScript" >
function OpenDialog (Url,param)
{
Return window.showModalDialog (Url,param, "Dialogwidth:450px;dialogheight:450px;help:no;status:no");
}
function Js_getdata (URL)
{
Return OpenDialog ("b.htm", "");
}
</script>
<body>
<form name= "Myfrm" >
<input type= "text" name= "filename" >
</form>
</body>
File b.htm
<script language= "JavaScript" >
Function Js_do (val)
{
Window.returnvalue=val;
Window.close ();
}
</script>
<body>
<form name= "Myfrm" >
<input type= "text" name= "filename" >
<input type= "text" name= "Btndo" >
</form>
</body>
Response.Write ("<script language= ' JavaScript" >window.opener.document.all.txt1.value= "+theValue+"; </ Script> ");