I have an onclick event for a radio button:
if ({luxnon}==‘L’) {
sc_ajax_javascript(‘checkmates’);
}
Here is “checkmakes” in the javascript programming section of the form app:
var LuxuryList = [‘BENTLEY’,‘VOLVO’,‘FERRARI’,‘BMW’];
var inputs = document.querySelectorAll(’[id^=‘id-opt-makes-’]’);
for (var i = 0; i < inputs.length; i++) {
if ( LuxuryList.indexOf(inputs[i].value) >= 0 ) { inputs[i].checked = true;
}
}
The goal is to go through all the “makes” checkboxes and where it finds the value of bentley, volvo, ferrari, bmw set those checkboxes to selected. Alas, it does call the script, but changes nothing. What is up?