manipulating radio box selection with javascript
<p>i'm trying to do a poll but i designed it without any radio box in it. So i decided to make the selection being highlighted with a different background color, all is done with jquery.</p>

<p>I set the display of the radio box to none so that it wouldn't show, gave each a unique ID. Here's the script.</p>

<pre><code>&lt;form action="v_poll.php" method="post"&gt;
&lt;ul class="voting"&gt;
&lt;li class="voting votetext"&gt;&lt;input type="radio" name="voting" value="a1" style="display:none;" id="a1"&gt;&lt;a onClick="vote('a1')"Answer 1&lt;/a&gt;&lt;/li&gt;
&lt;li class="voting votetext"&gt;&lt;input type="radio" name="voting" value="a2" style="display:none;" id="a2"&gt;&lt;a onClick="vote('a2')"&gt;Answer 2&lt;/a&gt;&lt;/li&gt;
&lt;li class="voting votetext"&gt;&lt;input type="radio" name="voting" value="a3" style="display:none;" id="a3"&gt;&lt;a onClick="vote('a3')"&gt;Answer 3&lt;/a&gt;&lt;/li&gt;
&lt;input type="hidden" value="1" name="id" /&gt;
&lt;input type="submit" value="submit"&gt;
&lt;/ul&gt;
&lt;/form&gt;
&lt;script type="text/javascript"&gt;
function vote(TheValue) {
GetElementById(TheValue).checked=true;
}
&lt;/script&gt;
</code></pre>

<p>But when i checked the value of the radio box with $_POST['voting'], it is blank. Not the value assigned to the radio box. Anything i'm doing wrong?</p>

<p>Please help. Thanks.</p>
