|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
This forum post relates to this article
Hi, when a user accidentally click close on the browser to close it, i want to prompt him somthing. How do i do it. window_onunload(),window_onbeforeunload() will oso be activated when the user click refresh. how do i solve this. |
|
#2
|
|||
|
|||
|
i think if you put onbeforeunload() in the body tag that should work. then you can run a alert window or a popup window via javascript
|
|
#3
|
|||
|
|||
|
hi,
it wun help either. onbeforeunload and onunload. both will be triggered on refresh of the page. |
|
#4
|
|||
|
|||
|
Unfortunately they are the only two even handlers that you can use to work out whether a user has "closed" the browser. The window object might provide a function to determine whether they left the page or closed the browser, try to history object as well.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Browser help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|