Oliver,<br>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.<br>Any tips? or other ways to retrieve query information and open a pop up window?<br>
<br>valerio<br><br><div><span class="gmail_quote">2008/3/13, Oliver Christen <<a href="mailto:oliver.christen@camptocamp.com">oliver.christen@camptocamp.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2">you use your project in ajax mode now ?</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><span class="q">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="valerionoti@yahoo.it" href="mailto:valerionoti@yahoo.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Valerio
Noti</a> </div>
</span><div><span class="e" id="q_118a8e4a6ca10341_2"><div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>To:</b> <a title="oliver.christen@camptocamp.com" href="mailto:oliver.christen@camptocamp.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Oliver Christen</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Cc:</b> <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, March 13, 2008 4:42
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [Cartoweb-users] Troubles
with tables.tpl</div>
<div><br></div>I tested democw3 tables.tpl in cw3.2 and 3.4<br>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.<br><br><span>[...]</span><br><span>{if $table->numRows >
0}<br><script
language=javascript><br>
{literal}<br></span><span></span><span>
<div> alert
('Test');<br>
{/literal}<br></script><br>[...]<br><br>Thank you
again<br><br>Valerio<br><br><br></div></span><br><br><br>
<div><span class="gmail_quote">2008/3/13, Valerio Noti <<a href="mailto:valerionoti@yahoo.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">valerionoti@yahoo.it</a>>:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">yes
it's what I did, I copied /coreplugins/tables/templates folder in
projects/MyProject/coreplugins/tables/templates folder, modified 3.4
template and inserted javascript code between
{foreach}{/foreach}<br><br>thank you<br><br>
<div><span class="gmail_quote">2008/3/13, Oliver Christen <<a href="mailto:oliver.christen@camptocamp.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">oliver.christen@camptocamp.com</a>>:</span>
<div><span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2">chance are pretty high the table template was modified
between 3.2 and 3.4 so I would suggest to compare a table templates in 3.4
and use it as a basis</font></div>
<div><font size="2"></font> </div>
<div><font size="2">regards</font></div>
<div><font size="2">Oliver</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div><span>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="valerionoti@yahoo.it" href="mailto:valerionoti@yahoo.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Valerio Noti</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
<a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cartoweb-users@lists.maptools.org</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Thursday, March 13, 2008 3:53 PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
[Cartoweb-users] Troubles with tables.tpl</div>
<div><br></div>Hello,<br>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.<br><br>The following code works
fine in cartoweb 3.2 but not in cw3.4:<br>[...]<br>{foreach from=$tables
item=group}<br>foreach from=$group->tables item=table}<br>{if
$table->numRows > 0}<br><script
language=javascript><br>
{literal}<br> strNomeTabella =
'{/literal}{$table->tableTitle
<div>}{literal}';<br> alert
('Test');<br>
{/literal}<br></script><br> {foreach
from=$table->columnTitles
item=column}<br> <script
language=javascript><br>
{literal}<br>
var campo =
'{/literal}{$column}{literal}';<br>
{/literal}<br>
</script><br>
{/foreach}<br>[...]<br>{/foreach}<br>{/foreach}<br><br>In cw3.4 it seems
that javascript code is not active. Nothing is saved in variables and
alert statement doesn't work.<br><br><br><br>Thank you very much for any
help<br><span><br><br>Valerio</span></div></span></div>
<p></p>
<hr>
<p></p>_______________________________________________<br>Cartoweb-users
mailing list<br><a href="mailto:Cartoweb-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Cartoweb-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
<p></p></blockquote></div></blockquote></span></div></div><span><br><br clear="all"><br>-- <br>/* <br>Valerio Noti<br>*/
</span></blockquote></div><br><br clear="all"><br>-- <br>/* <br>Valerio
Noti<br>*/ </span></div></blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br>/* <br>Valerio Noti<br>*/