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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top