I am trying to make a chat application. So within that when a user1 sends a private chat to user2 ,a popup should show at user2's screen. I did now i need to code to check whether the poped up window is open or close that ,if it is closed i need to popup it again ?
Well it sounds like for what your trying to do, you'd need to use ajax and PHP. The ajax part can be used to check a PHP page that would every 5 seconds or so send private messages added to a database and at the same time it also checks to see if the last ones were recieved and if they weren't, then re-send the alert. Most chat scripts have features similar to that so you can always find a script like that here.
Yes. I am using ajax and php everything as u said. But the problem is to check whether the prev popup is open or not.
Otherwise it opens new popup each time when a private msg is send.
Thanks 4 the refernces.
Do you knw any specific code for my issue?
The reason I included the window.opener part is because if you don't, then the popup will tell the user that its trying to close the window and it'll ask if they want to proceed. The window.opener should fix that and make it close anyway.
I don't think you can close it the way you mentioned but I'm not sure. You could probably use a div maybe?
Well, i had used window.open. It opens a small popup window, but when i close it it doesnt ask anything.
The exact problem i am facing is like this:
user1 sends a private chat and using window.open user 2 gets popup opened. That works perfect. The thing what happens is, if user1 or user2 closes that popup it wont open again.