Get checked row value id with jquery selector -


i try put id value behind radio checked element each record. works fine on view side, want id via jquery selector , post on ajax. html looks following:

<td>    <input type="radio" name="cursa_radio" id="cursa_radio" value="ticket_selected" route_value ="'.$data['route'][$i]['id'].'">             '.$data['route'][$i]['departure_station'].' //actual td value </td> 

this ajax:

$.ajax({      url: myvariable.urlsite + "curse_interne/getinternalticketprice",     type: "post",     datatype: 'json',     data: $("#first_step").serialize()      + '&internal_route_id=' +   $("input[name='cursa_radio']:checked ").text('value')      + '&' + $("#first_step").serialize(), 

note url site contorller file , getinternalticketprice function has this:

$a = $this->input->post('internal_route_id'); 

on console get:

string(15) "[object object]" 

any idea how return actual value of route_value ="'.$data['route'][$i]['id'].'"? thank you!

solved! modified selector :

$("input[name='cursa_radio']:checked").attr("route_value") 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -