Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Capture event Alt F4(browser closing) from task bar in JSP page
chaitanya chaitanya
Greenhorn
Posts: 1
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a code in which I am captureing browser closing event to end session variable.
window.onbeforeunload = function(){
if((window.event.clientX<0) ||(window.event.clientY<0))
this thing works when I close the browser from the top right(X) but this code is not working for browser close from task bar-> right click ->close
In this case the event(window.event) is not firing.
Need help in this regard.
Thanks,
Chaitaya
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please take the time to choose the correct forum for your posts. This forum is for questions on
JSP
, not JavaScript.
For more information, please
read this
.
This post has been moved to a more appropriate forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Eric Pascarello
author
Posts: 15385
6
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You are not going to catch all of the close events. All you have to work with in onbeforeunload.
If you are trying to clean up data on the server with a log out, that is what a session timeout is for.
Eric
Amit Ghorpade
Bartender
Posts: 2856
10
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
"chaitanya chaitanya" please check your private messages for an important administrative matter. You can see them by clicking the
My Private Messages
link above.
SCJP, SCWCD.
|
Asking Good Questions
|
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to prevent multiple login by the same user
window document object
Capture browser close
Problem with IE7
window.onClose in IE
More...