How to check a dirty flag
I was wondering what the best way is to check if a page is dirty if the user chooses to navigate away from it. For example, there is a registration form and the user enters all their information. Then accidentally clicks on the link to navigate away from it.
I found this on the internet where it checks to see if the page is dirty if a person makes changes to any form input values.
So this works great. But how can I exclude some of the links that pop up? Is there a better way to do this?
source to share