Re: [SMARTY] BIG PROBLEM - {literal} and parsing vars in JS

From: Date: Sat, 18 May 2002 20:01:47 +0000
Subject: Re: [SMARTY] BIG PROBLEM - {literal} and parsing vars in JS
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4304@lists.php.net to get a copy of this message
Or choose different Smarty delimiters. ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: "Ray" <rayge99@hotmail.com> Cc: <smarty-general@lists.php.net> Sent: Saturday, May 18, 2002 2:40 PM Subject: Re: [SMARTY] BIG PROBLEM - {literal} and parsing vars in JS > Either escape out of your literal tags each time you want to display a > smarty variable, or don't use literal tags, use rdelim and ldelim instead. > > <script language=javascript> > function foo () {ldelim} > var blah = {$myvar} > {rdelim} > </script> > > Ray wrote: > > >I have a JS script inside my tpl that Is needing to use variables from the php and smarty but unfortunatly since JS seems to require a {literal} {/literal} around it, its not parsing the data properly. I am not using the {literal} tags simply because i would need countless numbers of them due to the amount of variables we insert into our js. Is there any way around this? > > > >Thanks. > > > > > > > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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