|
-
Mar 15th, 2001, 07:04 AM
#1
Thread Starter
Lively Member
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.
Last edited by equuelus; Mar 18th, 2001 at 06:17 PM.
MohamadHassan<equuelus@icqmail.com>
Javascript,VBScript,ASP,LearningVBfor.NET
ICQ:7205608

-
Mar 15th, 2001, 07:18 AM
#2
similar to the windows start menu?
-
Mar 15th, 2001, 07:27 AM
#3
Thread Starter
Lively Member
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..
MohamadHassan<equuelus@icqmail.com>
Javascript,VBScript,ASP,LearningVBfor.NET
ICQ:7205608

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|