I am trying to echo a javascript alert message in php but I am having problems with enclosing the ”s of the alert inside the ”’s of the php.
The code looks like this >>
onclick="return confirm('Are you sure you want to delete this customer ?')"
If I use
echo onclick="return confirm('Are you sure you want to delete this customer ?')"
I get errors in dreamweaver on that line because of the extra ”s , if I use
echo ‘onclick=”return confirm(“Are you sure you want to delete this customer ?”)”‘;
I no longer get errors in php, but it still doesn’t work and the html produced gives me a duplicate attributes message because of the extra “”s it produces once it is outputted.
try