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

From: Date: Fri, 07 Mar 2003 10:29:57 +0000
Subject: Re: [SMARTY] Smarty and possibility to parse Javascript-Files?
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8476@lists.php.net to get a copy of this message
On Thu, Mar 06, 2003 at 09:20:30PM -0600, Jason Sweat wrote: > > ----- 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. and do header("Content-type: application/x-javascript"); at the top of js/CookieMgmt.php > I have never done this, but I have contemplated it for using > smarty config values in a css. > > Jason > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Torx-Schrauben: Hände-Weg-Schrauben nach Marc Habers Kollegen

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