thanks for ur reply
there is a list box with various cities and another list box is for states.Whenever i select a city from the list corresponding state should be selected automatically in the state list box.
iam a cpp developer.. i dont have indepth knowledge in js.
though i can give u the logic!
i got to know this from my colleague and replying you!
1. while declaring each items for the city combo box, maintain one custom variable and give it a number say for chennai, while declaring this option item, ,assign it a number say id = 1.
2. similaryly for all the cities that comes inside tamilnadu maintain the same id (i.e 1).
3. similaryly while delcaring the option items for the state combo-box, maintain the same numbers.
For example : while declaring tamilnadu option-item, assign it the number 1.
4. hence in the onchange event of the city combo box, get the option-item's number you have specified. (if you choosing chennai, the number you specified is 1, get that in a variable)
5. now iterate the numbers you have maintained for the states, and whichever state corresponds to this number, set that as the selected item in the state combo-box.