How, on client side, to dynamically change Downdownlist items.

  • Thread starter Thread starter Q. John Chen
  • Start date Start date
Q

Q. John Chen

I have two dropdownlist controls. ddlCountry and ddlState.
Say that ddlCountry has items United States and Canada, I want only
list US states if United States is selected and Canadian provices if
Canada.

It's simple to do it on the server but how can I do it ON CLIENT SIDE
with JavaScript.
 
In addition to ddlCountry and ddlStates prepare 2 hidden ddls: ddlUSStates
and ddlCanadianStates. On ddlCountry change copy options from the right
ddlXXStates to ddlStates.

Eliyahu
 
Back
Top