Page 1 of 1

onunload question

Posted: Mon May 31, 2004 5:57 pm
by PrObLeM
this is my code it doesnt have a popup of logout.php when the page is closed

Code: Select all

<body onunload='window.open("logout.php", "msgbox", "width=300, height=100, status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,toolbar=no"); return false;'>
but
onunload="alert('wait a sec!');" does work...

Thanks for the help

Posted: Mon May 31, 2004 7:13 pm
by feyd
try tossing it into a function..

Posted: Mon May 31, 2004 8:35 pm
by PrObLeM
did still didnt work :(

Posted: Mon May 31, 2004 10:41 pm
by feyd
seems to work just fine for me..

Posted: Mon May 31, 2004 10:41 pm
by PrObLeM
what browser you using?

Posted: Mon May 31, 2004 10:49 pm
by feyd
IE6 and mozilla

Posted: Mon May 31, 2004 10:53 pm
by feyd
oops.. mozilla isn't working..

Posted: Mon May 31, 2004 11:10 pm
by feyd
doing a bit of testing.. looks like mozilla doesn't support poping a window for unloads...

Posted: Tue Jun 01, 2004 12:09 am
by scorphus