$('form').bind('submit.disable', function() { return false; }).find(':input').one('change', function() { $(this).closest('form').unbind('submit.disable'); });
This should get you started. You might want to add/remove a class, too, to indicate the form's state.
Note that I namespaced the events so I wouldn't unbind any other handlers bound to the form. I also used .one('change', fn) to unbind the submit handler, because after you do this once, you no longer need it.
Hope that helps. --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 18, 2009, at 12:09 AM, titel wrote:
Hi guys, I'm kind of new to jQuery and what I'm trying to fogure out is this. What I'm trying to achieve is to have the submit button of a form, that may or may not be filled in with some content when the page is loading, and only have the Submit button activated when something is filled in (if the form was empty) or when something is modified in one of the form's fields (if there was something filled in). Is there a jQuery plugin that provides this functionality, or would it be possible to code something like this? Thank you in advance for your support, Constantin TOVISI