I am developing a web application where you can delete users. I am using codeigniter framework to develop this. Using this code, I am invoking "Doconfirm()" function in external javascript file.
//my view file
<img src="<?php echo base_url(); ?>Assests/Images/cross.png" alt="Delete User" title="Delete User" onClick="return Doconfirm()();" >
//inside DoConfirm function javascript file
window.location = site_url +"user/deleteusers/id";
I want to pass id from the view to javascript doconfirm function. I know I can take the id using this php code.
<?php echo $row['id']; ?>
What I want is to pass the id to the external javascript function "Doconfirm()" from the view. Any help will be highly appreciated.