Questions tagged [browser-close]
27 questions
0
votes
2 answers
run ajax request on browser closed
I am working on a site and currently encounter a problem, i have a user who would be a rider when he comes to my website he must be marked active and when he leaves he must be mark in-active. Well i am able to mark him active and even in-active when…

Maaz Khan
- 131
- 1
- 9
0
votes
1 answer
Why browser refresh and close event detection is not working for IE and Safari
I need to call logout function on the close of browser window gets close. It's working fine in Chrome not working in IE and Safari.
I have tried the following code:
window.onbeforeunload = function (e) {
// Your logic to prepare for 'Stay on…

Ramakrishnan Ramar
- 25
- 1
- 6
0
votes
0 answers
Some way to detect close tab/browser for all browsers?
There are some way of detecting a close event from tab/browser without close when i click in other links in page or forms and valid for all browser, i tested "beforeunload" and other replies about this topic here and not working, i am testing in…

Felipe Mora
- 42
- 1
- 11
0
votes
0 answers
Detecting user disconnection in PHP
I know that since HTTP is a stateless protocol, this cannot be detected directly. What I need to know is how to achieve this indirectly.
I am making a turn based game in PHP in which two users play over the internet. Need to detect disconnections of…

Ahmed Shefeer
- 386
- 2
- 12
0
votes
0 answers
how to hit a webservice while closing the browser window or tab?
I am facing a problem i need to hit the webservice before closing the tab.
i am using this
i don't know…

Sumit Aggarwal
- 831
- 2
- 16
- 29
0
votes
1 answer
Identify Click on browser close button for pop up message
I am trying to implement the functionality to confirm whether "Leaving the page" whenever the user tries to close the browser.
As of now i have implemented,
function closeIt(e) {
// For IE and Firefox prior to version 4
if (e) {
…

shiv
- 669
- 6
- 11
0
votes
2 answers
Can we capture an event when user presses X on the browser window?
is there a way differentiate between refresh and close in Javascript? i use window.onbeforeunload now which works great in IE. To void this being called anywhere but close, i set a flag on EVERY button ...this seems like a difficult, hacky solution,…

sarsnake
- 26,667
- 58
- 180
- 286
0
votes
4 answers
Notify user on browser close only
I am trying to implement notifying when the user closes or reloades the page.Crrently i am using the following code
function unloadPage(){
return "Your changes will not be saved.";
}
window.onbeforeclose = unloadPage;
This works fine.But the…

웃웃웃웃웃
- 11,829
- 15
- 59
- 91
0
votes
1 answer
Is there actually a way to open a popup on browser CLOSE?
I'm trying to launch a "logout" page if the usesr closes the browser...I've looked for a couple of days and I think I have looked at all of the related topics...tried quite a few...but so far, nothing is working the way I need it to...
Everything…

Edward
- 1
- 3
0
votes
1 answer
stopping asynchronous XMLHttpRequest
I have impatient users who update a piece of data on a web page. The update triggers an asynchronous XMLHttpRequest and the response causes the page to update.
My question is this. If the user closes the browser window before the request completes,…
0
votes
2 answers
Logoff when closing the browser ot leaving the website
Possible Duplicate:
Is there any way to know that user leaving a page with asp.net?
How can I perform automatic logout or closing the session when leaving my web application?
(like GMAIL, when you doesn't check "remember me", that logs you off if…

Inbal
- 909
- 2
- 28
- 46
0
votes
1 answer
how to set user status offline when he/she leaves my website
I am working on a website in php. how do we set user status to offline in databse when he leaves website by closing browser without click on logout button.

nkmaurya
- 53
- 1
- 5