Wednesday, March 31, 2004

Example to call a modal dialog from IE and pass values to it and get the return value

-----the caller code starts


<HTML>


<HEAD/>


 <BODY>


<SCRIPT LANGUAGE=javascript>


<!--


var mystr="hello";


mystr=window.showModalDialog("file://C:/Documents and
Settings/bhagyesh/Desktop/appa.html",mystr);


alert(mystr);


 //-->


</SCRIPT>


 </BODY>


</HTML>


-----the caller code ends


----the dialog code starts


<html>


<head/>


<body>


<script>


document.write(window.dialogArguments);


window.returnValue="bbbbb";


</script>


</body>


</html>


----the dialog code ends