Hi Joe,
Thanks a lot for replying, but i am still confused how will i go about setting a value in the hidden field.
My sample code is below, i tried to set value in the text field 'retvalA'( i ve removed that code now) but was not able to access it in modal dialog's javascript funtion.
<HTML>
<HEAD>
<script language="javascript">
function OpenChild()
{
var ParmA1 = f1.retvalA.value;
var WinSettings = "center:yes;resizable:no;dialogHeight:300px;dialog Width:700px;html:hello"
var titl="<TITLE>Child Webform</TITLE> ";
var scrst="<scr";
var scrend="ipt>";
var
js= scrst + "ipt language=\"javascript\">"
+" function Done() { "
+ " var ParmA = tbParamA.value;"
+" window.returnValue = ParmA; "
+" alert(\"ParamA=\" + window.returnValue); "
+" window.close();"
+" } "
+" function Exit() { "
+" window.close(); "
+" } "
+" </scr" + scrend;
var bdy= "This is just for testing. Your name is " + ParmA1
+"<P> <INPUT id=\"tbParamA\" TYPE=\"text\" size=30 value=\"this the original value\"></P>"
+" <TABLE width=200 >"
+" <TR>"
+" <TD width=50%><BUTTON size=100 onclick=\"Done()\" type=\"button\"> &nbs p;OK </BUTTON></TD>"
+" <TD width=50%><BUTTON size=100 onclick=\"Exit()\" type=\"button\"> CANCEL </BUTTON></TD>"
+" </TR>"
+" </TABLE>";
var pg="javascript
:'<html><head>" + titl +
js + "</head><body> "+ bdy +" </body></html>'";
var MyArgs = window.showModalDialog(pg,'',WinSettings);
if (MyArgs == null)
{
window.alert(
"Nothing returned from child. No changes made to input boxes")
}
else
{
retvalA.value=MyArgs;
}
}
</script>
</HEAD>
<body>
<form name="f1">
<P><INPUT type="text" name="retvalA" value="AAA"></P>
<P><BUTTON type="button" onclick="OpenChild()">
Open Child Window</BUTTON>
</P>
</form>
</body>
</HTML>