Hi,
does anyone knows if it's possible to notify a calling window (the one opening another using : newWin = window.open...) from the callee?
I want to notify the caller that the callee has finished what it had to do and that the caller may proceed with what it has to do.
So far, I tried calling a function of the calling window from the callee like that:
<script type="text/javascript">
function NotifyCaller(){
window.opener.BeNotify();
}
</script>
- <script type="text/javascript">
- function NotifyCaller(){
- window.opener.BeNotify();
- }
- </script>
it gives me an "object doesn't support this property or method" error
in the calling window, I just want to check that the callee didn't had any error. since the callee should close itself if there was no error, in my BeNotify function, I check if the callee is closed, if not I close it and prompt the user with an error like this :
<script type="text/javascript>
function BeNotify(){
if(!newWin.closed){
winNew.close();
alert("There was an error");
}
}
</script>
- <script type="text/javascript>
- function BeNotify(){
- if(!newWin.closed){
- winNew.close();
- alert("There was an error");
- }
- }
- </script>
another problem I have is that if there is an error in the callee, the code stops to execute and doesn't call the caller function.
So basically, all I want to do is notify the calling window when the callee window is done (this window is only ASP, hidden window that runs a Transac SQL string and then close) or if an error occurs.
I hope it's clear, if not I will clarify.
Thanks all