I am trying with various amounts of success to open a popup window from within a php script when a user logs in and then to close it when they log out.
So far I can open the window with this code
but I cannot seem to close the window when the user logs out. I have tried the following - all without any success
and
Am I trying to do the impossible? or have I missed something somewhere along the way?
David
Remember: You only know what you know
and - you don't know what you don't know!
So far I can open the window with this code
Code:
echo "<script language=\"JavaScript\">newwindow = window.open('./myfile.php', 'newwindow', 'height=400, width=200, left=2000, top=500, toolbar=no, menubar=no, directories=no, location=no, scrollbars=no, status=no, resizable=yes, fullscreen=no');</script>";
Code:
echo '<script language=\"JavaScript\">newwindow.close();</script>';
Code:
echo '<script language=\"JavaScript\">(newwindow && newwindow.open && !newwindow.closed) newwindow.close();</script>';
Am I trying to do the impossible? or have I missed something somewhere along the way?
David
Remember: You only know what you know
and - you don't know what you don't know!