Oliver, yes it's in ajax mode and if I disable ajax, javascript code works inside the tpl . If it's active it works only when I reload the page. Any tips? or other ways to retrieve query information and open a pop up window?
valerio 2008/3/13, Oliver Christen <[EMAIL PROTECTED]>: > > you use your project in ajax mode now ? > > ----- Original Message ----- > *From:* Valerio Noti <[EMAIL PROTECTED]> > *To:* Oliver Christen <[EMAIL PROTECTED]> > *Cc:* cartoweb-users@lists.maptools.org > *Sent:* Thursday, March 13, 2008 4:42 PM > *Subject:* Re: [Cartoweb-users] Troubles with tables.tpl > > I tested democw3 tables.tpl in cw3.2 and 3.4 > This code works in 3.2 each time I click on the map with query tool. In > 3.4 it works only when I reload the page, when I use query tool alert > doesn't appear. > > [...] > {if $table->numRows > 0} > <script language=javascript> > {literal} > alert ('Test'); > {/literal} > </script> > [...] > > Thank you again > > Valerio > > > > > > 2008/3/13, Valerio Noti <[EMAIL PROTECTED]>: > > > > yes it's what I did, I copied /coreplugins/tables/templates folder in > > projects/MyProject/coreplugins/tables/templates folder, modified > > 3.4template and inserted javascript code between {foreach}{/foreach} > > > > thank you > > > > 2008/3/13, Oliver Christen <[EMAIL PROTECTED]>: > > > > > > chance are pretty high the table template was modified between 3.2and > > > 3.4 so I would suggest to compare a table templates in 3.4 and use it > > > as a basis > > > > > > regards > > > Oliver > > > > > > ----- Original Message ----- > > > *From:* Valerio Noti <[EMAIL PROTECTED]> > > > *To:* cartoweb-users@lists.maptools.org > > > *Sent:* Thursday, March 13, 2008 3:53 PM > > > *Subject:* [Cartoweb-users] Troubles with tables.tpl > > > > > > Hello, > > > I usually modify tpl files inserting javascript code. i.e. I modified > > > tables.tpl in order to open a pop-up windows when user click on the > > > map with query tool. > > > > > > The following code works fine in cartoweb 3.2 but not in cw3.4: > > > [...] > > > {foreach from=$tables item=group} > > > foreach from=$group->tables item=table} > > > {if $table->numRows > 0} > > > <script language=javascript> > > > {literal} > > > strNomeTabella = '{/literal}{$table->tableTitle }{literal}'; > > > alert ('Test'); > > > {/literal} > > > </script> > > > {foreach from=$table->columnTitles item=column} > > > <script language=javascript> > > > {literal} > > > var campo = '{/literal}{$column}{literal}'; > > > {/literal} > > > </script> > > > {/foreach} > > > [...] > > > {/foreach} > > > {/foreach} > > > > > > In cw3.4 it seems that javascript code is not active. Nothing is saved > > > in variables and alert statement doesn't work. > > > > > > > > > > > > Thank you very much for any help > > > > > > > > > Valerio > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > Cartoweb-users mailing list > > > Cartoweb-users@lists.maptools.org > > > http://lists.maptools.org/mailman/listinfo/cartoweb-users > > > > > > > > > > > > -- > > /* > > Valerio Noti > > */ > > > > > -- > /* > Valerio Noti > */ > > -- /* Valerio Noti */
_______________________________________________ Cartoweb-users mailing list Cartoweb-users@lists.maptools.org http://lists.maptools.org/mailman/listinfo/cartoweb-users