SV: [SMARTY] {literal} + variabel

From: Date: Sun, 04 May 2003 10:19:14 +0000
Subject: SV: [SMARTY] {literal} + variabel
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9466@lists.php.net to get a copy of this message
Thanks, I was thinking of this solution also. But it felt like I was thinking in the wrong way and there should be an easier way to do it.. Well, it works :-) //Mattias -----Ursprungligt meddelande----- Från: Wom.bat [mailto:wom.bat@gmx.net] Skickat: den 4 maj 2003 12:17 Till: Mattias Hallström Kopia: smarty-general@lists.php.net Ämne: Re: [SMARTY] {literal} + variabel do {literal} <script language="JavaScript"> <!-- function fix(id) { var accessoryId = Array ( {/literal}{$test}{literal} ); ..................... } //--> </script> {/literal} Bye David ----- Original Message ----- From: "Mattias Hallström" <di98mha@student.bth.se> To: <smarty-general@lists.php.net> Sent: Sunday, May 04, 2003 12:13 PM Subject: [SMARTY] {literal} + variabel > Hi, > > I am trying to assign a string variable to a javascript which is > inside {literal}-tags. But that is not possible when I have the > {litaral} around it. > > Am I trying to do this in the wrong way? > Would appriciate if someone could help me out in the right direction > :-) > > {literal} > <script language="JavaScript"> > <!-- > function fix(id) > { > var accessoryId = Array ( {$test} ); > > ..................... > } > //--> > </script> > {/literal} > > ------------------------------ > {$test} is a string like this: "5", "6", "4". > > > //Mattias > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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