smarty with javascript
| From: | carlos castillo | Date: | Fri, 02 Jan 2004 20:17:31 +0000 |
| Subject: | smarty with javascript | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10768@lists.php.net to get a copy of this message | ||
HI, i have the following problem, i have a function in javascript that
loads some combo info , but i cant assign the value of the smarty var to
a var in javascript, you know how i can do it.
This is some part of the code
switch(valor){
case "0":{
options[0]=new Option("<--Seleccione una Ucr","0");
}
break
{/literal}
{section name=idu loop=$ucrtot}
{literal}
case "{/literal}{$ucrtot[idu].id}{literal}":{
i=0
{/literal}{section name=idp loop=$ucrdep}
{if $ucrtot[idu].id == $ucrdep[idp].dep}
{literal}
i=i+1
var dep = "{/literal}$ucrdep[idp].dep{literal}"; //THIS
DOESNT WORK
alert(dep+'*'); //THIS SHOWS $ucrdep[idp].dep*
options[i]=new
Option('{/literal}$ucrdep[idp].ubicacion{literal}','{/literal}$ucrdep[id
p].ubicacion{literal}');
{/literal}{/if}{/section}{literal}
if(i == 0) {
options[0]=new Option("<--Seleccione una
Ucr","0");
}
}
break
{/literal}{/section}{literal}
}
Carlos A. Castillo.
Ingeniero de desarrollo
ccastillo@imagine.com.co
____________________________________
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia
____________________________________
- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico
____________________________________