getting value of dropdown list in AJAX
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: getting value of dropdown list in AJAX

Hybrid View

  1. #1
    Join Date
    Apr 2003
    Location
    Malta
    Posts
    13

    getting value of dropdown list in AJAX

    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
    www.johannmontfort.com

  2. #2
    Join Date
    Aug 2005
    Location
    Milwaukee, WI
    Posts
    55

    Re: getting value of dropdown list in AJAX

    Got Code?

  3. #3
    Join Date
    Mar 2000
    Location
    Vancouver, BC, Canada
    Posts
    277

    Re: getting value of dropdown list in AJAX

    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);
    David Meikle
    Quantum Unit Solutions, LLC
    www.quantumunit.com
    FusionSEO RSS Feeds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center