I need to submit some data via ajax. It is not a form, but there are couple of radiobuttons on the page that belond to a form.
I need to detect which of the two radio buttons is selected when I send ajax request, without submitting the form and append that value to my ajax post. How do I do that?
$.ajax({
url: "ajax.php",
type: "POST",
data: "op="+act+"&radioButton="+id
});
<input class="radioB" type="radio" value="all" name="users" checked> All
<input class="radioB" type="radio" value="some" name="users"> Some
There are more options how to check which of the buttons is selected e.g.
So it would transform into: