I have added JavaScript to my pages that will detect if the user has made a change to a field and prompts the user to save those changes when they perform an action that will take them away from the page.
To do this, I'm performing 2 basic steps:
- On the input keyup event, I'm setting a "dirty" variable to "true"
- On the document.ready event, I'm prompting the user to "save changes" (if dirty = true) on the window.onbeforeunload event.
This has been working for all pages in my project, until I began using the RadTreeView. When I make a change on a page that has a RadTreeView, and then click on a Node that takes the user to a new page, they are prompted. If the user clicks "Cancel", the following error is thrown:
"htmlfile: Unspecified Error"
I have created a basic example that utilizes the following:
- Visual Studio 2010
- Telerik.Web.UI version 2010.1.519.40
Any help would be greatly appreciated!