using onload and window.open with php
Posted: Wed Jul 30, 2003 11:59 am
I'm writing a simple chat program for my website and have everything done EXCEPT that i'm trying to use the following code to log users out when they leave the page.:
onunload="window.open('goodbye.php&username=<?php echo $username ?>', null, 'height=150, width=300, status=no, toolbar=no, menubar=no, location=no')"
the $username is a php variable passed win logging in and is used for who is online. The html produced looks correct.:
onunload="window.open('goodbye.php&username=admin', null, 'height=150, width=300, status=no, toolbar=no, menubar=no, location=no')"
but it will not work because the browser refuses to recognize goodbye.php when passing the variable $username(?username=admin). I need this page to load to remove the username from the online list. Can someone PLEASE HELP.
onunload="window.open('goodbye.php&username=<?php echo $username ?>', null, 'height=150, width=300, status=no, toolbar=no, menubar=no, location=no')"
the $username is a php variable passed win logging in and is used for who is online. The html produced looks correct.:
onunload="window.open('goodbye.php&username=admin', null, 'height=150, width=300, status=no, toolbar=no, menubar=no, location=no')"
but it will not work because the browser refuses to recognize goodbye.php when passing the variable $username(?username=admin). I need this page to load to remove the username from the online list. Can someone PLEASE HELP.