PHP templeate and client JavaScript.

From: Date: Sun, 14 Apr 2002 18:01:41 +0000
Subject: PHP templeate and client JavaScript.
Groups: php.general 
Request: Send a blank email to php-general+get-92927@lists.php.net to get a copy of this message
Hi, I'm not sure if this belongs to JavaScript or PHP section. I'm running into problems when I'm trying to use php templates with embeded JavaScript. In my template file, I have something like... <script language="JavaScript"> .... function Show() { if(layer) { if(timer) { clearTimeout(timer); } for(menu=0; menu<Layer.length; menu++) { if(Layer[menu]) { eval(layer).visibility = "hidden"; } } for(i=0; i<arguments.length; i++) { menu=arguments[i]; eval(layer).visibility = "visible"; } } } .... </script> When I instantiate the template in my PHP file and do a view source, I get this instead: <script language="JavaScript"> .... function Show() for(menu=0; menu<Layer.length; menu++) } for(i=0; i<arguments.length; i++) } } .... </script> As you can see, the all the 'if' statements are missing? Why is that? Thanks, -Peter

« previous php.general (#92927) next »