- Thu Sep 01, 2016 7:03 am
#786437
Hi friends i am having a problem , i want to disable the textfield called "Renewal Frequency" ,i have two radio button "New Vehicle" & "Existing Vehicle". whenever i select the Compliance Type "Existing Vehicle" the textfield should be disable.
key 1 for "New Vehicle" & key 0 for "Existing Vehicle"
The following is my code -tell me where i went wrong
function checkComplianceFor() {
if( $('#complianceType').getValue() == 0 ){
$("#renewalFrequency").disabled = true;
} else {
$("#renewalFrequency").disabled = false;
}
}
$('#complianceType').setOnchange(checkComplianceFor);
key 1 for "New Vehicle" & key 0 for "Existing Vehicle"
The following is my code -tell me where i went wrong
function checkComplianceFor() {
if( $('#complianceType').getValue() == 0 ){
$("#renewalFrequency").disabled = true;
} else {
$("#renewalFrequency").disabled = false;
}
}
$('#complianceType').setOnchange(checkComplianceFor);