Forums

This topic is locked

checkboxes

Posted 03 Dec 2004 23:45:28
1
has voted
03 Dec 2004 23:45:28 Simon Wantling posted:
Hi,
Is there anyway that I can change the initial unchecked value of a checkbox to something other that zero. I want to send a hex number to a mysql database which is different to the check value hex number. Hope you can help.
Thanks
Simon

Replies

Replied 04 Dec 2004 02:13:06
04 Dec 2004 02:13:06 Simon Martin replied:
Not really Simon
Checkboxes are really there to indicate that an option has been selected. If you do not tick the tickbox then nothing is submitted.
However you could assign a default value for each checkbox, so if the user does not tick the box nothing will be sent - check for the presence of in the request.form collection and if it isn't there then assign whatever you want

Live the life you love
Love the life you live

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]

Reply to this topic