[jQuery] Re: how to disable and enable submit button via jQuery [code included]

2007-07-05 Thread Klaus Hartl
Allan Mullan wrote: I believe this is because you can't actually remove the attribute "disabled" - Instead try doing $("#submitanswer).attr("enabled", "enabled"); No, there is nothing like an enabled attribute. Just set the disabled attribute to true or false (I found that to be the most r

[jQuery] Re: how to disable and enable submit button via jQuery [code included]

2007-07-05 Thread Karl Rudd
Try: $("#submitanswer").attr("disabled", ""); Karl Rudd On 7/6/07, PaulM <[EMAIL PROTECTED]> wrote: if($("#answer").val().length < 200){ $("#submitanswer").attr("disabled","disabled"); } will disable it but than upon the key press

[jQuery] Re: how to disable and enable submit button via jQuery [code included]

2007-07-05 Thread Allan Mullan
I believe this is because you can't actually remove the attribute "disabled" - Instead try doing $("#submitanswer).attr("enabled", "enabled"); (plus you had an error in your syntax, you didn't put a # in that removeAttr line...) Hope that helps Allan PaulM wrote: if($("#an