Excellent explanation of how to submit a form with ajax using jquery - visit :
http://www.ajaxlines.com/ajax/stuff/article/how_to_submit_a_form_with_ajax_in_jquery.php
Thursday, August 5, 2010
jQuery: Access value of selected/checked radio button
if you have a group of radio buttons (grouping done using same value for name attribute in all) and you want to get value of selected radio button out of them,
using jquery you can do that with below code snippet:
Suppose you have:
Diya [name="bolly",value="diya"]
Kareena [name="bolly",value="kareena"]
Katrina [name="bolly",value="katrina"]
Then,
You will get: sel_val = "diya"
For more reference:
http://stackoverflow.com/questions/986120/how-to-get-select-radiobutton-value-using-its-name-in-jquery
using jquery you can do that with below code snippet:
Suppose you have:
Diya [name="bolly",value="diya"]
Kareena [name="bolly",value="kareena"]
Katrina [name="bolly",value="katrina"]
Then,
var sel_val = $('input:radio[name=bolly]:checked').val();
You will get: sel_val = "diya"
For more reference:
http://stackoverflow.com/questions/986120/how-to-get-select-radiobutton-value-using-its-name-in-jquery
Subscribe to:
Posts (Atom)