Trouble With Java Scripts and PHP
Here's my Program :
<?
echo"<head> \n<SCRIPT LANGUAGE=\"JavaScript\">\n<!-- Begin \nfunction Start(page) { \nOpenWin = this.open(page, \"CtrlWindow\", \"toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=680,height=460\"\n}\n// End -->\n</SCRIPT>\n</head>";
?> <font size="3" face="Arial, Helvetica, sans-serif"><a href="javascript:Start(' echo $title; ?>')";><? echo $eventtitle;?></a></font>" ;?> <?
?>
How The Script Works:
It would generate a list of ie movie title affcrz that title would be clickbale. And When n user clicks that link a new window will appear..
This script is ok... but the thing is when n user pass variable to $event=Treb's World, the javascript function fails, it fails to open a new window why? bec of '. My Question is how to get out of this trouble.. Help me re write the code above... suggstn are welcome...
TNX
Here's my Program :
<?
echo"<head> \n<SCRIPT LANGUAGE=\"JavaScript\">\n<!-- Begin \nfunction Start(page) { \nOpenWin = this.open(page, \"CtrlWindow\", \"toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=680,height=460\"\n}\n// End -->\n</SCRIPT>\n</head>";
?> <font size="3" face="Arial, Helvetica, sans-serif"><a href="javascript:Start(' echo $title; ?>')";><? echo $eventtitle;?></a></font>" ;?> <?
?>
How The Script Works:
It would generate a list of ie movie title affcrz that title would be clickbale. And When n user clicks that link a new window will appear..
This script is ok... but the thing is when n user pass variable to $event=Treb's World, the javascript function fails, it fails to open a new window why? bec of '. My Question is how to get out of this trouble.. Help me re write the code above... suggstn are welcome...
TNX