0

How to capture event when user closes browser window?

asked 2011-12-12 16:50:21 +0800

carpolva gravatar image carpolva
155 4

Hi !!

Just one question:

If the user closes the browser window (pressing the "X" or close button in the top right corner) how can I capture that event and show a Messagebox warning the user for example "you haven't saved changes yet, are you sure you want to close the window?". Is there any way to do this in ZK or I need to use pure JavaScript?.

I'll appreciate any help.

Regards.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-12-14 14:44:28 +0800

carpolva gravatar image carpolva
155 4

Any idea? :(

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-12-12 16:50:21 +0800

Seen: 140 times

Last updated: Dec 14 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More