javascript - How to edit value in a specific td after clicking button -
here's button
<button id="modify" role="button" class="btn btn-warning" disabled>modify</button>
here's script modify button
$("#modify").click(function(e) { e.preventdefault(); var id = $('#cloanout2 tr.active').attr('id'); bootbox.confirm("are sure want modify order?","no","yes",function(r){ if(r) { $.ajax({ url : "<?php echo $server_name; ?>/emcis_coopmain/process/php_groceryreleasingprocess.php", type : "post", async : false, data : { empgrocmstid:id, todo:"modify" }, success:function(result){ bootbox.alert('order modified',function(){ $("#modify").attr("disabled", true); }); loadtable(); } }); } else { } }); });
and td
in php
$html .= "<td class='qty_ordered' style='text-align:right'>$qty_ordered</td>";
how can edit value on td after clicked modify button?
thanks help
if class specific <td>
simple as
$("td.qty_ordered").html("<your new value here>");
also, if assumption correct, change td
value inside success()
function in ajax()
call.
mabuhay!
Comments
Post a Comment