Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if form is dirty

Status
Not open for further replies.

tas2826

Programmer
Jul 6, 2005
26
0
0
US
I have a form with several several types of input elements, hidden, text, radio, etc. The user can edit them. In which case when the form is submitted, the values are being passed. However, another action they can take is to do a search. The search performs an ajax call, returns some data, and I use this data in .js code and populate the inputs on the form. However, in this case, when I submit the form, the values are not being passed.

So, my question, is there a way to make the form dirty if the user has not changed the value? If so, what is the name of the attribute to set? Or, do I have to check each element as some of the examples I have found do? It appears that if the value is set systematically then the dirty flag is not set for the field.

Thanks,

Troy
 
are you submitting the form programmatically? if so might you have a control called 'submit'?

if not, perhaps you could share your form code.
 
I think I just realized what the issue is. In the case where a search is performed then the fields are set to disabled. Therefore, they are not submitted with the post. It just took extricating my cranial apparatus from a certain body orifice to realize why it was not "working".

Thanks

Troy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top