I am trying to run a javascript function with PHP. However, I get a JS error saying unterminated string literal with this php code. Echo("<a href = # onclick=checkName('{$rcd}', '{$title}')> Del </a>");
The only problem I can see is that in the html it looks like this checkName('91', 'AD1 Moore'); The script stops at the blank white space. Any ideas why a white space is causing me issues? I should note that checkName calls some AJAX stuff.