For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > March 2004 > Re: [SMARTY] smarty+javascript









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] smarty+javascript
Gabriel Birke

2004-03-19, 1:29 pm



> Hi! I have 2 tables: $table and table[i].tabel_suboptions .These are 2
> smarty variables assigned in php.
>
>
> {literal}
> <script language="javascript">
> alert ("ggg");
> var a=new Array();
> var lung=new Array();
>
> var nr_max={/literal}{$nr_base}{literal};
>
> i=0; j=0;
> {/literal}
>
> {section name="i" loop=$table}
> {literal}
> lung[i]= {/literal}{$table[i].nr_suboptions}
> {literal}
> i++;
>
> {/literal}
> {/section} //this section runs well
>
>
> {literal} //from this point, nothing happens
> for (i=0;i<=lung[i]-1,i++){


I think this should be

for (i=0;i<lung.length,i++){

What happens if you replace this line?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com