I am trying to add some javascript code to my list, but i am not having any luck with it. My goal is to:
- page loads no check boxes are checked
- when user checks one box a second check box will be checked at the same time and the others will gray out. Can anyone help me with this?
Here is my testing example that i am not having any luck with...
<![CDATA[<script type="text/javascript">
function enableTextBox()
{
if (document.getElementById("ctl00_m_g_6b2cd800_765f_4cff_860f_53b0a713a6c4_ff61_ctl00_ctl02").checked = true)
alert("I am an alert box!");
}
</script>
]]>
checked = true
which assigns the value of true, it is not a comparison. Use either==
or===
. w3schools.com/js/js_comparisons.asp