I have a form named "FrontPage_Form 2" and a checkbox named "checkboxPowerU nit"; and, I want to programmaticall y change whether or not it is checked by default based on a selection made in a selection box. I have tried:
and every one results in an error saying "document.whate ver" is null or not an object. Can anyone tell me how to indicate that this checkbox should be checked or unchecked?
Code:
document.FrontPage_Form2.checkboxPowerUnit.checked=true; document.all.checkboxPowerUnit.checked=true; document.form[0].checkboxPowerUnit.checked=true; document.form[0].checkboxPowerUnit[0].checked=true; document.FrontPage_Form2].checkboxPowerUnit[0].checked=true;
Comment