Hi,
I've put together this javascript taken from various sources, but i think it is wrong or missing something. If particular options are selected within a drop down menu, then the check botton will auto check and disable (grey out) at the same time. If seems like if will work fine but int he database it will wont show as selected, but if I manually check it, it will record fine in the DB so the form works, but not the javascript. Here is the code. i need help - i have no idea what is wrong.
<script language="JavaS cript"> function updateCheckBox () {
selectedItem = form1.scrp_arw. options [form1.scrp_arw. selectedIndex].value;
if (selectedItem != '') {
form1.scrp_home _cz.checked=tru e; form1.scrp_home _cz.disabled=tr ue; }
else {
form1.scrp_home _cz.disabled=fa lse form1.scrp_home _cv.checked=fal se;
}
}
updateCheckBox ();
</script>
I've put together this javascript taken from various sources, but i think it is wrong or missing something. If particular options are selected within a drop down menu, then the check botton will auto check and disable (grey out) at the same time. If seems like if will work fine but int he database it will wont show as selected, but if I manually check it, it will record fine in the DB so the form works, but not the javascript. Here is the code. i need help - i have no idea what is wrong.
<script language="JavaS cript"> function updateCheckBox () {
selectedItem = form1.scrp_arw. options [form1.scrp_arw. selectedIndex].value;
if (selectedItem != '') {
form1.scrp_home _cz.checked=tru e; form1.scrp_home _cz.disabled=tr ue; }
else {
form1.scrp_home _cz.disabled=fa lse form1.scrp_home _cv.checked=fal se;
}
}
updateCheckBox ();
</script>
Comment