[jQuery] Re: Disable Submit button if no text entered

2008-05-16 Thread sashabe
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_n

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread sashabe
Thanks!!! That's exactly what I wanted =) Don't know if it's a bug, but with val entering some text in textarea with blank name field activated the button. With text() it stopped to do so. And, as I've read from some of the messages, text() could be more effective when dealing with textarea conte

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread sashabe
').removeAttr('disabled')); }); HTML: Now textarea does work (text() did the trick) - that is, submit button is not activated when text is entered only there. But still, if you enter text only in the text field (#post_name), it IS act

[jQuery] Disable Submit button if no text entered

2008-05-14 Thread sashabe
Hello! I have on the page one input field, a textarea and a submit button. I've managed to write a little script (it cost me many hours:) which currently disables the submit button if no text entered in the input field OR textarea. However, I need both of them populated for the button to be acti