views:

207

answers:

2

I'm a newb to jQ so please forgive my ignorance.

I'm using Asa Wilson's plugin jquery.dirtyform.js to prompt a user of unsaved changes before they nav away from a page (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).

Thank you.

A: 

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.

dustinson
A: 

Hello,

I'm trying to accomplish the same thing. I have a AJAX TabPanel and I want to prompt the user to save changes before moving to the next tab. I'm new to Jquery, so I'm wondering if can explain how you were able to detect when a change occured.

-Josie

Josie
here are the links I used to get started:http://plugins.jquery.com/project/dirtyformhttp://github.com/acvwilson/dirty_formAdditionally you will need to include these filesjquery.ui.all.cssjQuery-1.4.2.min.jsjquery.ui.core.jsjquery.ui.widget.jsjquery.ui.mouse.jsjquery.ui.position.jsjquery.ui.draggable.jsjquery.UI.Dialog.js
dustinson