I'm using Asa Wilson's plugin jquery.dirtyform.js to prompt a user of unsaved changes before they nav away from a page 开发者_JAVA百科(ASP.Net C# 3.5).
It basically loops through all controls and appends a class and handler to each input. Controls w/i an ajaxToolkit:TabPanel are ignored, unfortunately.
I'd appreciate if anyone knows of this type of error and how to resolve it short of manually manipulating each control (as I have this logic in the master page).
Found the problem. The content in the AJAX TabPanel wasn't rendered when the jQuery event $(document).ready() fired, thus the controls were not "watched".
I simply added an event to the rogue controls to re-fire $("form").dirty_form();
Seems to be working thus far. I'm sure there is a more eloquent solution.
精彩评论