My question is how to pull the username into the confirmation popup... would I have to change the way my php is generating the list of users or would it need some mootools coding to select the parent and then the username... if so how could I achieve that?
I have my PHP code using codeigniter to generate the following kinda things which is basically listing a username and a link to delete the user.
<div class='item'>
<a href="http://localhost/nstrust/index.php/admin/users/delete/9" class="delete">Delete</a> <a href="http://localhost/nstrust/index.php/admin/users/view/9" class="view">Jamalia</a>
</div>
<div class='item'>
<a href="http://localhost/nstrust/index.php/admin/users/delete/13" class="delete">Delete</a> <a href="http://localhost/nstrust/index.php/admin/users/view/13" class="view">Timothy</a>
</div>
I have the following mootools code to pop up and confirmation to see if the user really want to delete the user
window.addEvent('domready', function()
{
$$('a.delete').addEvent('click', function(event)
{
if (!confirm("Are you sure you want to remove this user?"))
{
event.stop();
}
});
});