Click to See Complete Forum and Search --> : SELECT (combobox) onChange


rbollen
05-23-2003, 06:54 AM
Hi everyone,

I'm making a site. A user has to set his location. For that I use a form with 2 combo boxes (Selects). One is to set the country, the other to set the city.

But I want to make sure that when someone selects the country Belgium, only the cities of Belgium are displayed in the city-combo box.

Can anyone help me with this? I've looked everywhere to find it, but haven't found it yet.

Thanx

;) ;) ;)

requestcode
05-23-2003, 10:21 AM
Check this site out:
http://www.javascriptkit.com/script/cutindex16.shtml

They have some sample scripts that you can modify.

khalidali63
05-23-2003, 10:38 AM
You might want to take a look at this resource,prety much does exactly what you want..

http://68.145.35.86/skills/javascripts/DropDownSelectCountryShowCities.html

:D

pudong
05-27-2003, 12:16 PM
I am trying to get dynamics drop down box corresponding to each other. My data is from a database. The data is defined in php : $group which is 2-d array. How can get the data into javaScript.

Here is what I did

<script>
<!--


<% for (i=0; i<groups; i++) { %>



<% for (j=0; j<3; j++) { %>

grouptext[i][j]= <%=$group[i][j]%>;

groupvalue[i][j]= <%=j%>;



<% } %>

<%}%>

</script>

but it generates javascript error : wrong syntacs on <% .

what is the correct syntacs?