-
Javascript....Help
Greetings citizens of vb-world..
I'm having problems with the onChange event in javascript...i'll tell you what i want to do..
have you ever came across those lets say a country drop down menu that lists all the countrys in it and a state drop down menu that lists all the states in the country chosen in the country drop down menu.
how do you do that... when i select say .... united states.. then automatically the state drop down meny will only have the states in the united states of america only.. and when i change the country lets say.. malaysia.. the option in the states drop down menu will only list the states in malaysia..
can anyone help me with this or give me a working example for it please..
thanks in advance.
-
similar to the windows start menu?
-
sorry..
i think i got everyone confused here... its not a drop down menu.. it's a selection menu in html .. you know the..
Code:
<select name="select">
<option value="country one">country one</option>
<option value="country two">country two</option>
<option value="etc">etc</option>
</select>
so what i want to do is call a function that detects what states are availabe in a certain country.. so.. i added up
the
Code:
onChange="javascript:whateverfunction()"
in the select tag.
this function then will display the list of states in the states selection menu.
i think this is better with xml isn't it.. it would be much easier to handle the data binding..
i got the idea.. but don't seem to know how to make it work..