Giovanni,<br>IMHO you must modify your PHP source code in order to do what you want.<br><br>In the ClientYourPluginName.php file you could modify as following:<br><br>public function renderForm(Smarty $template) {<br> <br>
...... <br> <br> $template->assign('first_query', $this->query_sql()); <br> <br>... <br>... <br> <br>}<br><br>where query_sql() is the function that queries your database and return resultset (you can look at here: <a href="http://www.cartoweb.org/cwiki/HowToDisplayOnTheMapAPointFromADatabaseQuery">http://www.cartoweb.org/cwiki/HowToDisplayOnTheMapAPointFromADatabaseQuery</a>). Remeber Cartoweb uses PEAR extension to connect and query DB...<br>
After you can call the variable "first_query" from your application cartoclient.tpl file (so you must modify it. Remeber to make a --clean after deploying cartoweb). All values can be put in the YourPluginName.tpl file where a <select></select> section is just prepared or you can create YourPluginName.tpl file dinamically inserting you values..<br>
<br>In order to select a second value coming from the choise of the first one, you have to create an "onchage" event on the first select item in order to fetch the value and make the second query...<br><br>Fabio D'Ovidio<br>
<br><br><div class="gmail_quote">2008/6/10 Giovanni Virdis <<a href="mailto:g.virdis@riteco.it">g.virdis@riteco.it</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="IT">
<div>
<p style="background: white none repeat scroll 0% 50%; line-height: 14.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Can someonehelp
me .<font color="black"><span style="color: black;"> I post my answer many times
but nobody help me. Please I'm new and I need help</span></font></span></font></p>
<p style="background: white none repeat scroll 0% 50%; line-height: 14.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Hi, </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">if is possibile i want populate the select item from
db. I have modify the dhtmlEdit.js file to show a select item with a fix value</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">var authorisedOptionsList = new Array(1, 2, 3);</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">var authorisedOptionsListLabel = new Array('Strutture
pubbliche', 'Strutture per il commercio', 'Strutture militari');</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">How i can populate this item by db select?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> Is possible chanche the value of second select
item when I change the value of first select item ?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Example</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">1° Select value:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font color="#3300cc" face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial; color: rgb(51, 0, 204);" lang="EN-GB">1, 'America'<br>
2, 'Europa'</span></font></p>
<p><font color="#3300cc" face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial; color: rgb(51, 0, 204);" lang="EN-GB">3, 'Asia'</span></font></p>
<p><font color="#3300cc" face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial; color: rgb(51, 0, 204);" lang="EN-GB">4, 'Oceania'</span></font></p>
<p><font color="#3300cc" face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial; color: rgb(51, 0, 204);" lang="EN-GB">5, 'Africa'</span></font></p>
<p><font color="#3300cc" face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial; color: rgb(51, 0, 204);" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">2° Select value:</span></font></p>
<p><font color="#3300cc" face="Tahoma" size="1"><span style="font-size: 8.5pt; font-family: Tahoma; color: rgb(51, 0, 204);" lang="EN-GB"> </span></font></p>
<p><font color="#3300cc" face="Tahoma" size="1"><span style="font-size: 8.5pt; font-family: Tahoma; color: rgb(51, 0, 204);" lang="EN-GB">1, 'Giappone'<br>
2, 'Cina'<br>
3, 'Mongolia'<br>
4, 'Stati Uniti'<br>
5, 'Canada'<br>
6, 'Messico'<br>
7, 'Italia'<br>
8, 'Spagna'</span></font></p>
<p style="background: white none repeat scroll 0% 50%; line-height: 14.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
</div>
</div>
<br>_______________________________________________<br>
Cartoweb-users mailing list<br>
<a href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users" target="_blank">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
<br></blockquote></div><br>