Forum Moderators: coopster
<script language="JavaScript" type="text/javascript">
function foo( str ) {
var strOnclick = "<?php foo2('" + str + "');?>";
return "<a href=\"#\" onclick=\"" + strOnclick + "\"><img src=\"mypic.gif\" alt=\"" + str + "\"></a> ";
}
</script>
The value of strOnclick is correct, with proper apostrophes included. Yet, the debugger mentions a syntax error. Is there another way of what I am trying to achieve?
Thanks in advance
Tech Nossomy
You should have the javascript post a form and have php code that interprets the post on the server and executes foo2.
-=casey=-