I've got a simple question: how can I make an onclick return confirm event work inside PHP tags.
<HTML>
<BODY>
<a href="delete.php" OnClick="return confirm('blah blah');"> Click here </a>
<?PHP
ECHO "<a href='delete.php' OnClick='return confirm('blah blah');'> Click here </a>";
?>
</BODY>
</HTML>
the first link is a simple html link with an onclick event that displays a message that allows the user to confirm the link or cancel it. canceling it will stop the link from loading.
but when I ported it inside the php tags ( and changed the "" in the link code to ' ' in order for it to work with no errore. the return confirm event will not trigger and the page will load just as though there were no onclick event.
there has to be a way to make this work with php ( since it would be absurd for it not to work inside php tags ).
So please help me out with this.