Tag: Warning before navigate away

Warning before navigate away from a page

In some cases, if you are in between any work of editing or typing a content, and you wont let the visitor to navigate away from the page without particular condition, say the document is not saved yet, you can block the navigation (even the closing of the browser window) with Javascript. Code: window.onbeforeunload = …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/02/warning-before-navigate-away-from-a-page/