I guess that the close_option() function gets called all the time, since
you're using the onFocus event.
Try and change that event to something else (e.g. onDblClick) to see if
it works better.
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: arsal01@h... [mailto:arsal01@h...]
Skickat: den 14 november 2002 04:45
Till: javascript
=C4mne: [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 ?
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>
Thanks
Arsalan