php - By jquery, select table row with radio button value -


i populating table data database. table row has radio button. using jquery how check radio of row checked? how read columns values of row?

here table population code.

<table id="wo_table" class="table table-striped responsive-utilities table-hover jambo_table">     <thead>         <tr class="headings">             <th>                 <input type="checkbox" id="selectone" class="flat">             </th>             <th class="column-title">wo id </th>             <th class="column-title">create date </th>             <th class="column-title">buyer </th>             <th class="column-title">style </th>             <th class="column-title">quantity </th>             <th class="column-title">gg </th>             <th class="column-title">status </th>             <th class="column-title">remarks </th>         </tr>     </thead>      <tbody>          <?php         $querystring="select * win_work_order";         fetchwolist($querystring);             function fetchwolist($querystring){                 include 'connectiontodatabase.php';                 $result=mysql_query($querystring);                  while($test = mysql_fetch_array($result))                 {                     echo                         '<tr class="even pointer">                             <td class="a-center ">                                 <input type="radio" class="flat" name="table_records"    value=' .$test['wo_id']. '></td>                             <td class=" ">' .$test['wo_id']. '</td>                             <td class=" ">' .$test['wo_create_date']. '</td>                             <td class=" ">' .$test['buyer_name']. '</td>                             <td class=" ">' .$test['style_name']. '</td>                             <td class=" ">' .$test['wo_qty']. '</td>                             <td class=" ">' .$test['currency_qty_gg']. '</td>                             <td class=" ">' .$test['wo_status']. '</td>                             <td class=" ">' .$test['wo_remarks']. '</td>';                      echo "</tr>";                 }                  mysql_close($conn);              }          ?>      </tbody>  </table> 

$('#wo_table input:radio:checked').val() give id, or undefined if nothing's checked. don't read data html, use id got, validate format, fetch row id data.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -