Code: Select all
<input name="checkbox1" id="checkbox1" type="checkbox" value="abc" onClick="document.forms[0].hidden1.value = '1'>
<input name="hidden1" id="hidden1" type="hidden" value="0">So I want if you click the checkbox first to tick it, the hidden1 value is put to 1. Then if you click that same checkbox again to untick it, I want the hidden1 value changed back to 0.
How do I do it?
Thanks