Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. fill dropdownlist in javascript

fill dropdownlist in javascript

Scheduled Pinned Locked Moved ASP.NET
helpcsharpjavajavascriptasp-net
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    helelark123
    wrote on last edited by
    #1

    Hi, I am developping in asp.net 2005. I have 2 dropdownlists A and B. When i am selecting an item from A, I would like to fill Dropdownlist B but without posting back. If I understand right, I have to do this in javascript. The problem is that I want to read from my database (access). Please, see example of what i am trying to do: selecting 'state' will fill 'city' accordingly: http://www.magicbricks.com/property/faces/jsp/search/requirementSearch.jsp?SEARCH_PAGE=REQUIREMENT_SEARCH[^] Please help

    Shay Noy

    S P I 3 Replies Last reply
    0
    • H helelark123

      Hi, I am developping in asp.net 2005. I have 2 dropdownlists A and B. When i am selecting an item from A, I would like to fill Dropdownlist B but without posting back. If I understand right, I have to do this in javascript. The problem is that I want to read from my database (access). Please, see example of what i am trying to do: selecting 'state' will fill 'city' accordingly: http://www.magicbricks.com/property/faces/jsp/search/requirementSearch.jsp?SEARCH_PAGE=REQUIREMENT_SEARCH[^] Please help

      Shay Noy

      S Offline
      S Offline
      SHatchard
      wrote on last edited by
      #2

      If you are using .net 2.0 you can achieve this with a control in the ajax control toolkit which can do cascading dropdowns. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx[^]

      H 1 Reply Last reply
      0
      • H helelark123

        Hi, I am developping in asp.net 2005. I have 2 dropdownlists A and B. When i am selecting an item from A, I would like to fill Dropdownlist B but without posting back. If I understand right, I have to do this in javascript. The problem is that I want to read from my database (access). Please, see example of what i am trying to do: selecting 'state' will fill 'city' accordingly: http://www.magicbricks.com/property/faces/jsp/search/requirementSearch.jsp?SEARCH_PAGE=REQUIREMENT_SEARCH[^] Please help

        Shay Noy

        P Offline
        P Offline
        pmarfleet
        wrote on last edited by
        #3

        You could do this using ASP.NET AJAX[^]. Follow the tutorials on the site for more information.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        H 1 Reply Last reply
        0
        • H helelark123

          Hi, I am developping in asp.net 2005. I have 2 dropdownlists A and B. When i am selecting an item from A, I would like to fill Dropdownlist B but without posting back. If I understand right, I have to do this in javascript. The problem is that I want to read from my database (access). Please, see example of what i am trying to do: selecting 'state' will fill 'city' accordingly: http://www.magicbricks.com/property/faces/jsp/search/requirementSearch.jsp?SEARCH_PAGE=REQUIREMENT_SEARCH[^] Please help

          Shay Noy

          I Offline
          I Offline
          Imran Khan Pathan
          wrote on last edited by
          #4

          You can also do it using Icallback. Go to Demo and code Best Regard pAthan

          please don't forget to vote on the post that helped you.

          H 1 Reply Last reply
          0
          • S SHatchard

            If you are using .net 2.0 you can achieve this with a control in the ajax control toolkit which can do cascading dropdowns. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx[^]

            H Offline
            H Offline
            helelark123
            wrote on last edited by
            #5

            thanks

            Shay Noy

            1 Reply Last reply
            0
            • P pmarfleet

              You could do this using ASP.NET AJAX[^]. Follow the tutorials on the site for more information.

              Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

              H Offline
              H Offline
              helelark123
              wrote on last edited by
              #6

              thanks

              Shay Noy

              1 Reply Last reply
              0
              • I Imran Khan Pathan

                You can also do it using Icallback. Go to Demo and code Best Regard pAthan

                please don't forget to vote on the post that helped you.

                H Offline
                H Offline
                helelark123
                wrote on last edited by
                #7

                I success to implement the callback process with 2 dropdownlist. When my page is posting back, the second dropdownlist (with the callback) is beeing empty. What is the problem? What can I do to prevent this? Thank you

                Shay Noy

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups