I've tried, and the way i found to do it is like this: $Calculate = $("#Calculate");
then you check the other vars and enable/disable it with: $Calculate.attr("disabled", "true"); or $Calculate.removeAttr("disabled"); -- Gustavo On Apr 4, 9:08 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Rick Faircloth schrieb: > > > > > Well... if you're going to be picky... ;o) > > > Sorry... here's the code: > > > function toggleButton() { > > > $Calculate = $("#Calculate")[0]; > > > if($("principal_status").val() == "true" > > &&($("interest_status").val() == "true" > > &&($("years_status").val() == "true"))) > > > { > > > $Calculate.disabled = false; > > } > > else > > { > > $Calculate.disabled = true; > > } > > > } > > I'd just condense that a little: > > function toggleButton() { > var disabled = !($("principal_status").val() == "true" && > $("interest_status").val() == "true" && $("years_status").val() == "true"); > $("#Calculate").attr({ disabled: disabled }); > > } > > -- Klaus