I have a simple form with one text field and a submit button. Upon clicking submit, I make an ajax request which returns some jquery to execute. In this jquery, I disable the submit button of the form and enable the button if the text field changes. Following is the code I am using:
$("#my_form input[type=submit]").attr("disabled","true");
$("#my_form #my_form_text").change(function()
{
$("#my_form input[type=submit]").removeAttr("disabled");
});
The issue is that I want the submit button to be enabled as soon as I change the text field. The submit button is enabled after I change the text field AND move the cursor out of the text field. Is there a way the submit button gets enables as soon as I make a modification in the text field (even with my cursor still being in the text field)?
Thanks.