Yes, but it seems that the script checks the input length only one time at
page load, and then button's state doesn't change if you continue to type or
delete input's content. 

Michael E. Carluen-2 wrote:
> 
> 
> Another suggestion will be to get the length of the field:
> 
> var t = ($('#post_name').val()).length;
>       if (t > 0) {
>       $("[EMAIL PROTECTED]").removeAttr('disabled');
>       }
> 
> This way, you can even have the option of enforcing a minimum char length
> of
> the field/s.
> 
> Michael
> 
> 
>> It seems that submit method is not what this case requires because it
>> does
>> the job when user interacts with submit button (correct me please if I'm
>> wrong). The button should be disabled if both field and textarea (now
>> they
>> are id's ;) do not contain any text, to prevent blank records. And the
>> only
>> event that might check contents of textareas and inputs seems to be
>> keyup...
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Disable-Submit-button-if-no-text-entered-tp17226575s27240p17273665.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to