5
How can I put a button related to each other?
Example:
<span class="IWLABEL10CSS" id="IWLABEL7">Distrito</span>
<select name="PAIS" size="1" width="180" class="COMBODISTCSS" id="COMBOFAB" tabindex="1">
<option value="Indiferente">Indiferente</option>
<option value="Portugal">PORTUGAL</option>
<option value="Brasil">BRASIL</option>
<option value="Espanha">ESPANHA</option>
</select>
and then I have another option which is the Councils.
<span class="IWLABEL7CSS" id="IWLABEL7">Concelho</span>
<select name="CIDADE" size="1" width="195" class="COMBOCONCCSS" id="COMBOFAB" tabindex="1">
<option value="Indiferente">Indiferente</option>
<option value="Lisboa">Lisboa</option>
<option value="Porto">Porto</option>
<option value="Madrid">Madrid</option>
<option value="Barcelona">Barcelona</option>
<option value="Brasilia">Brasilia</option>
<option value="São Paulo">São Paulo</option>
I choose SPAIN in the first option PARENTS and I want it to appear only In the cities BARCELONA, MADRID, etc.
Javascript/jQuery is required
– Silvio Andorinha
With jQuery you can do this.
– GarouDan
and how this function is called in javascript?
– ChrisAdler
You would need a json file with all countries and cities. and then when you selected the country you would pick the selected one and do the search within the json to bring the cities related to the country, but I believe it would be too big to be answered here.. but I’ll see what I can get for you... wait...
– Silvio Andorinha
And you already have all the code on the page or go to search via Ajax?
– Sergio
I have everything on the same page.
– ChrisAdler
OK. Post the code you have and the answer is very easy.
– Sergio
Got it like this. The two option buttons.
– ChrisAdler