I can't figure out why this simple isn't working. I've tried a number of variations. I've tried examining the vars with debugging output.
I have a bunch of forms on the page, each one having just one text input and a submit button. When the user types in any of the forms I want to make sure the text field is not empty (i.e., they haven't just cleared the field) and enable the submit button accordingly. However, the state of the submit button does not change. I've verified that the script is getting called. I also tried $("input") instead of $("form"). Is there some error here that I'm missing. I've tried using either line 3 (now commented) and line 4, below. $(document).ready(function(){ $("form").keyup(function(event){ //var activeForm = $(event.target).parents('form'); var activeForm = this.form; if ($(event.target).fieldValue()[0].length > 0) { $('[EMAIL PROTECTED]', activeForm).attr("disabled", false).removeClass('formfielddisabled'); } else { $('[EMAIL PROTECTED]', activeForm).attr("disabled", true).addClass('formfielddisabled'); } }); }); -- View this message in context: http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11754742 Sent from the JQuery mailing list archive at Nabble.com.