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