I have a table with two radio buttons for each row, these buttons are approve and reject,
so for each row they’ll have different name.
When I get the value of selected radio button into jquery the first choice will affect the rest, means if I choose approve for the first, no matter what I select for the rest their status becomes approved!
here are the codes:
jQuery:
var status=$('input:radio[name=status_input_+ID]:checked').val();
HTML:
<input name="status_input_<?php echo $id; ?>" type="radio" value="Approved">
Approve
<input name="status_input_<?php echo $id; ?>" type="radio" value="Rejected">
Reject
Use this :
value should be enclosed in quotes. Refer this link