Click to See Complete Forum and Search --> : set value of checkbox on check


tcovert
01-08-2004, 11:05 PM
How would I set the value of a checkbox in my form to 'Y' if the box is checked and 'N' if it isn't?

Any suggestions?

fredmv
01-08-2004, 11:09 PM
<input type="checkbox" onclick="value = checked ? 'Y' : 'N';" />

tcovert
01-09-2004, 10:42 AM
This sets the value to "on" when checked, and nothing when unchecked. How would I make the value be 'Y' if checked and 'N' if uncheched?