1. Comfirm before delete:
<a href="#" title="delete" class="delete" onclick="return confirm('Are you sure you want to delete this item')">Delete</a>
2. How to show confirm message before delete using jquery:
<button onclick="return confirm('Are you sure you want to Delete?');"
id="btnDelete">DELETE</button>
3. Inside php code:
<a href='edit.php?cmd=delete&id=$id' onClick=\"return confirm('Are you certain that you want to DELETE this record?')\" >Delete</a></td>
4. Inside php code:
<?php
$row = array();
$row[] = '<a href="'.base_url().'user/delete_chmentor/'.base64_encode($userList->id).'" onClick="return confirm(\'Are you sure you want to Delete?\')">
<button type="button" class="btn btn-danger delete_user">Delete</button></a>';
return $row;
?>
No comments:
Post a Comment