when a button is clicked, i want to update a database and come back to the form without the processed row.
HTML table:
<tr id="row1"><td>...</td><td>(button id="process1")</td><td>(button id="cancel1")</td></tr> <tr id="row2"><td>...</td><td>(button id="process2")</td><td>(button id="cancel2")</td></tr> ......
How do I get the id of the button clicked? so I can parse the id, and determine which row to send to the database?
$(document).ready(function(){
$("[id^=process]").click(function(){
???
$.post("process.php",function(data){})
});
$("[id^=cancel]").click(function(){
???
$.post("cancel.php",function(data){})
});
})

New Topic/Question
Reply


MultiQuote






|