How to make the 'Are you sure you want to navigate away from this page' warning message in browser?
<p>I have a web page that contains a textbox and a submit button. When the user edits the text in the textbox and clicks another link (not the submit button) how do I display the 'Are you sure you want to navigate away from this page' popup message?</p>

<p><strong>I have researched this on the net</strong> and found a few javascript examples. Is this the only way you can do this? If not, what is the best way to do it?</p>
