The following script enables the submit button if a form if is filled up.
However I have a textarea
<textarea id="description" tabindex="15" style="width:500px;" name="description" cols="80" rows="10">
and I can not know how to add it for checking. If I type in all textboxes and leave the textarea empty, it will be submitted.
$(document).ready(function () {
$('form').delegate('input:text, input:checkbox', 'blur keyup click change', function () {
if(($('form input:text').filter(function(){ return $.trim(this.value) == ''; }).length > 0))
{
$('#btnUpdate').attr("disabled", true);
}
else {
$('#btnUpdate').removeAttr("disabled");
}
});
});
Thank you
Try changing this:
to
EDIT
The code should be: