By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Q. John Chen" <qj****@email.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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.

Nov 19 '05 #2

P: n/a
You may want to investigate remote scripting.

The following example demonstrates dynamically filling secondary lists
based on a primary list selection.

http://www.dart.com/livetutorial/dis...ist%20Controls

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.