javascript - how to delete row instantly which contain string(tr_obj ) using js -
function deleteuser(tr_obj,ul_userid) { if(confirm("do want delete user "+ul_userid+"?")) { $.ajax({ url:"/core/ajax_delete.php", data: { login_id:ul_userid,action:'user'}, async: false, success: function(data) { if(data==1) { deletetemplaterow(tr_obj); } } }); } }
i tried many option not getting delete instantly
function deleteselectedrow(tr_obj) // tr_obj returns tr_1,tr_0.. { $(tr_obj).remove(); //$(this).closest('tr').remove(); //$("#user_listing_table").datatable().fndeleterow(tr_obj) }
row getting delete not instantly,i need refresh each time of deletion.
if have reference class or id table this
eg: if table has id mytable
if want remove children of dom including header
$("#mytable").empty()
if want remove except header
$("#mytable").slice(1).remove()
Comments
Post a Comment