message window triggered by browser back / window close
Im a php developer interested in going a little more client side. I nee开发者_运维知识库d to find a way to create some kind of dialogue when either the browser back or window close buttons are hit. Can you give me an idea of the best way to go about this.
Many thanks Giles
Here's a good place to start: https://developer.mozilla.org/en/DOM/window.onunload.
I think you want the 'onbeforeunload' event, or 'onunload'.
Some discussion here
For a dialog, I would look at the dialog widget from Jquery UI.
精彩评论