Hey guys,
I'm trying to echo a link that has an onclick attribute attached to it, but when I click on the link on the page, just goes to the desired page, and doesn't preform the onclick action.
Here's my code:
<?php
if(session_is_registered("sesvar")){
echo ("<a href='../../admin/comment-delete.php?id=$id2' onclick='return(confirm('Are you SURE you want to delete this comment??'))';><img src='../../images/delete.png' align='left' alt='Delete This Comment?'></a>");
}
?>
If anyone could show me how to make it work an alternative way, that would be great.
Thanks a lot,
Colm