I have a php script that echoes html-code with in one of the attributes a call to a javascript function.
the working html-code is
<input type="button" value="Cal" onclick="displayCalendar(document.forms[0].theDate,'yyyy/mm/dd',this)">
in my php-script this becomes
<?php
echo '<input type="button" value="Cal" onclick="displayCalendar(document.forms[0].theDate,\'yyyy/mm/dd\',this)">';
?>
then the call to the javascript function fails.
I think it has something to do with the escaping of the quotes...
Thanks in advance
Stefan