There is a chat button, and when users click on that chat button a new window will be opened and both the users can chat
how can i know, whether chat window is still open or not, when any of the user logged out from the application ?
and give a message, "chat window still open" and close the chat window...
name of the chat window : chat<?=$user->username?>
...
I'm tracking when user logout, and other tries to send a message....then i'm giving him a message and close that window
code to open a window
win = window.open('../chat/index.php?user=<?=$uname->username?>','chatApp<?=$uname->username?>','width=400, height=500');
i need to close the chat window when users click on logout ? is this code right ?
echo "<script>win.close();</script>";
Thanks for the kind help