HTML Code
<a href="javascript:void(0);" onclick="delete(<?php echo $row->id;?>);">Delete</a>
Javascript Code
<script type="text/javascript">
var url="<?php echo base_url();?>";
function delete(id){
var r=confirm("Do you want to delete this?")
if (r==true)
window.location = url+"user/deleteuser/"+id;
else
return false;
}
</script>
No comments:
Post a Comment