For this post, I will just go short and sweet. Seems easy , but lots of people looking for this solution.
var media_type = $(”input[@name=media_type]:checked”).val();
Note :@name=radio_button_id
Here’s the sample HTML
<tr>
<td class=”form_content_white_text” valign=”top”><div align=”right”>Media Type: </div></td>
<td valign=”top” class=”form_content_white_text”>
<input name=”media_type” type=”radio” id=”media_type” value=”photo” checked />Photo
<input name=”media_type” type=”radio” id=”media_type” value=”video” />Video
</td>
</tr>
October 7th, 2009



Home