How to confirm on navigating away from page : <p>I recently looked up how to do this, and it took <em>way</em> too long to find it. So here you guys go, I'm sharing how to make an "<code>ARE YOU SURE YOU WANT TO LEAVE THIS PAGE?</code>" dialog.</p>
