Re: [SMARTY] Smarty and possibility to parse Javascript-Files?

From: Date: Fri, 07 Mar 2003 03:20:30 +0000
Subject: Re: [SMARTY] Smarty and possibility to parse Javascript-Files?
References: 1 2 3 4 5  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8470@lists.php.net to get a copy of this message
----- Original Message ----- From: "Matthias Mohr" <MMohr@sysdesign-edv.de> To: <smarty-general@lists.php.net> Sent: Thursday, March 06, 2003 7:49 PM Subject: Re: [SMARTY] Smarty and possibility to parse Javascript-Files? > > Matthias, > > > > Could you just do: > > -------------------------------------------------------------------------- -- > > - > > <script language="javascript" type="text/javascript" > > src="js/CookieMgmt.php"> <-note the extension change > > </script> > > -------------------------------------------------------------------------- -- > > - > > > > And have another Smarty aware script there? > You mean to write out the javascript-code via PHP? > > I don't think this would work. > Or are the browsers intelligent enought to handle your suggestion and really load > the js/CookieMgmt.php as PHP-code (and not as javascript)? > Your PHP script would output valid javascript, but you might have your script use some delimiters other than { and } just to make it easy on yourself. I have never done this, but I have contemplated it for using smarty config values in a css. Jason

« previous php.smarty.general (#8470) next »