yommm
asked on
Modal IE dialog calling function in parent
Experts:
I have a modal IE dialog opened by the snippet below. I would like the modal to call a javascript function in the parent IE window on close, with something like this
<INPUT type=button value=Close onClick="javascript:window .opener.fo cus();wind ow.opener. Navigate(E ventID);">
The problem is that i get an error, stating that window.opener is null or not an object. I am open to different solutions, as long as I can on close of the modal call my function in the parent.
Thanks for you help
I have a modal IE dialog opened by the snippet below. I would like the modal to call a javascript function in the parent IE window on close, with something like this
<INPUT type=button value=Close onClick="javascript:window
The problem is that i get an error, stating that window.opener is null or not an object. I am open to different solutions, as long as I can on close of the modal call my function in the parent.
Thanks for you help
<html>
<head>
<form method="post" action="test2.asp" name="ErrorCheck">
<title>Test</title>
<SCRIPT language="javascript">
function modalWin() {
if (window.showModalDialog) {
window.showModalDialog("errordisplay2.asp?","Error","dialogWidth:350px;dialogHeight:500px");
} else {
window.open("errordisplay2.asp?","Error","height=350,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");}
}
function Navigate(EventID)
{
document.frmNavigate.action="ADCheck.asp"
document.frmNavigate.EventID.value=EventID;
document.frmNavigate.submit();
}
window.onload = modalWin;
</SCRIPT>
</head>
</body>
</html>
Hello
Modal Dialog is something which is compatible with only IE (as per my knowladge). Why dont you use window.open method ??
You can call a function from the parnent window on close of this pop window like this..
<body onBeforeUnload="opener.Nav igate("arg ")">
pop up Window
</body>
Modal Dialog is something which is compatible with only IE (as per my knowladge). Why dont you use window.open method ??
You can call a function from the parnent window on close of this pop window like this..
<body onBeforeUnload="opener.Nav
pop up Window
</body>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.webreference.com/js/tutorial1/opener.html