Click to See Complete Forum and Search --> : getting value of dropdown list in AJAX


monfu
July 4th, 2006, 10:00 AM
Dear All,

I have an asp.net dropdown list and I am populating it with a set of values with Ajax. As so I cannot retreive the value as I usually do, which is ddl.SelectedValue.

Can you please tell me how I can retreive the value of this dropdown list please.

Thanks for your help and time

Johann

gitter1226
July 18th, 2006, 02:21 PM
Got Code?

dmeikle
September 11th, 2006, 02:20 PM
in your javascript method, simply access the value of the selection box using the DOM. good examples of this can be located at w3schools.com under javascript->DOM:


completeCityField = document.getElementById("state");

var url = "autocomplete-city?action=complete&id=" + escape(completeCityField.value);