coders4hire
IS-IT--Management
I need to utilize checkboxes on one of my pages where the user selects the content that he/she wants to obtain. Rather than submit those values independently, I want to concatenate the answers into a single value.
I would like a delimiter in between every option, selected or not. So if events, tech, and dev are checked... I would like to submit a value for MYVAL of:
Where null is an unselected value and the value is the selected value.
Doug
Code:
<table>
<tr><td><INPUT type="checkbox" id=news name=news value=news></td><td>News</td></tr>
<tr><td><INPUT type="checkbox" id=events name=events value=events></td><td>Events</td></tr>
<tr><td><INPUT type="checkbox" id=promos name=promos value=promos></td><td>Promotions</td></tr>
<tr><td><INPUT type="checkbox" id=info name=info value=info></td><td>Info</td></tr>
<tr><td><INPUT type="checkbox" id=tech name=tech value=tech></td><td>Technical</td></tr>
<tr><td><INPUT type="checkbox" id=dev name=dev value=dev></td><td>Developer</td></tr>
</table></P>
I would like a delimiter in between every option, selected or not. So if events, tech, and dev are checked... I would like to submit a value for MYVAL of:
Code:
<input type=hidden name=myval value="null;events;null;null;tech;dev">
Where null is an unselected value and the value is the selected value.
Doug