Ho problemi a ottenere i dati della tabella nella riga se è selezionato un pulsante. Ho due pulsanti per approvare e negare e in base a quale pulsante i clic dell'utente voglio catturare i dati utilizzando la query. può ottenere i numeri delle righe e roba solo non i dati delle righe. Devo avere l'id e il tester.recupera i dati della riga utilizzando jquery facendo clic sui pulsanti per quella riga
qui è quello che ho
<table id="mytable" width="100%">
<thead>
<tr>
<th>ID</th>
<th>Tester</th>
<th>Date</th>
<th>Approve</th>
<th>Deny</th>
</tr>
</thead>
<tbody>
<tr class="test">
<td class="ids">11565 </td>
<td class="tester">james</td>
<td>2012-07-02 </td>
<td><Button id="Approved" type="submit" >Approved</button>
</td>
<td><Button id="deny_0" type="submit" >Denied</button>
</td>
</tr>
</tbody>
</table>
qui è il mio javascript per ottenere il numero tr e td, ma non sono sicuro come usarlo per ottenere quello che mi serve
$(document).ready(function() {
/*$('#cardsData .giftcardaccount_id').each(function(){
alert($(this).html());
}); */
$('td').click(function(){
var col = $(this).parent().children().index($(this));
var row = $(this).parent().parent().children().index($(this).parent());
alert('Row: ' + row + ', Column: ' + col);
// alert($tds.eq(0).text());
console.log($("tr:eq(1)"));
// $("td:eq(0)", this).text(),
});
});