I've answered your another mail. As a remark, it seems that
win_name.closed
is buggy in IE.
> -----Message d'origine-----
> De : arsal01@h... [mailto:arsal01@h...]
> Envoy=C3=A9 : jeudi 14 novembre 2002 05:45
> =C3=80 : javascript
> Objet : [javascript] alert method in Netscape 7
>
>
> I am calling a function within which i am using alert. This
> alert prompt
> doesnt disappear when i click on its OK. any clue ?
I don't really see what you want to do here. Nothing seems to work
in IE either, maybe because of the bug. But I know the problem in your
code.
The alert box is created by the main window. When you click its OK
button, focus is returned back to the main window and once more your
close_option function is called and a new alert box is created. If you
look
carefully, you should see that the alert did disappear for a short
while.
>
> function open_window(fn) {
> newwin =3D window.open(fn);
> }
>
> function close_option() {
> var nn =3D newwin.closed;
> alert("status:"+nn);
> return true;
> }
>
> //-->
> </script>
>
> </head>
>
> <body onfocus()=3D"if (window.newwin) close_option(); " >
> <a href=3Djavascript:open_window('arsal.html');>Open Window</a>
> </body>
>