jamkelvl Posted January 16, 2010 Share Posted January 16, 2010 <?php echo '<td class="view" width=""><a href="edit.php?recordID='.$id.'">edit</a> <a href="delete.php?recordType=job&recordID='.$id.'" onClick="alert('Alert message goes here');">delete</a></td>'; ?> Anyone know why this alert isn't working? Quote Link to comment https://forums.phpfreaks.com/topic/188724-php-javascript/ Share on other sites More sharing options...
oni-kun Posted January 16, 2010 Share Posted January 16, 2010 You can see the obvious error if you look at the syntax highlighting. You need to escape the quotes within alert, or use double quotes: <?php echo '<td class="view" width=""><a href="edit.php?recordID='.$id.'">edit</a> <a href="delete.php?recordType=job&recordID='.$id.'" onClick="alert(\'Alert message goes here\');">delete</a></td>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/188724-php-javascript/#findComment-996255 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.