I have two radio buttons:
<table border="0" width="500">
<tr><td><?php echo form_label('Register with a Club', 'club'); ?> <?php echo form_radio('individual', 'club', '', 'id=club'); ?></td><td><?php echo form_label('Register as an Independent', 'independent'); ?> <?php echo form_radio('individual', 'independent', '', 'id=independent'); ?></td></tr>
</table>
this spits out:
<table border="0" width="500">
<tr><td><label for="club">Register with a Club</label> <input type="radio" name="individual" value="club" id=club /></td><td><label for="independent">Register as an Independent</label> <input type="radio" name="individual" value="independent" id=independent /></td></tr>
</table>
I am trying to alert out the value of the of the radio button group....I have tried...
<script type="text/javascript">
$(function(){
alert($("input[name='individual']").val());
});
</script>
but it returns only 'club' once, why is not alerting 'independent'?