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. dropdown list

dropdown list

Scheduled Pinned Locked Moved ASP.NET
javascripthtml
6 Posts 2 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.
  • S Offline
    S Offline
    sudharsong
    wrote on last edited by
    #1

    hi all, in my application im using HTML dropdown list ,in which i got list of mail id's and text name of that.so if select any of that id i want that value should be displayed in textbox in my form,,without postback it i need to do this with Javascript .please anyone tell me the way. with regards, susa

    S 1 Reply Last reply
    0
    • S sudharsong

      hi all, in my application im using HTML dropdown list ,in which i got list of mail id's and text name of that.so if select any of that id i want that value should be displayed in textbox in my form,,without postback it i need to do this with Javascript .please anyone tell me the way. with regards, susa

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

      hi all, for the above problem,i didn't mentioned my code. im using this one.someone tell me what i have to do function fnOnchange(){ var ddobj=document.getElementById("<=%DDL2 %>"); var txtobj=document.getElementById("<=%TextBox1%>%"); txtobj.value=ddobj.Options[ddobj.SelectedIndex].value; return true; // txtobj.value=ddobj.SelectedIndex.value; } hi to all with regards, susa

      C 2 Replies Last reply
      0
      • S sudharsong

        hi all, for the above problem,i didn't mentioned my code. im using this one.someone tell me what i have to do function fnOnchange(){ var ddobj=document.getElementById("<=%DDL2 %>"); var txtobj=document.getElementById("<=%TextBox1%>%"); txtobj.value=ddobj.Options[ddobj.SelectedIndex].value; return true; // txtobj.value=ddobj.SelectedIndex.value; } hi to all with regards, susa

        C Offline
        C Offline
        CWIZO
        wrote on last edited by
        #3

        put a onchange attribut into your select box :

        ...
        

        (remove _ in from the on_change) and then write a JS function:function copyEmail () { var selectElement = document.getElementById ( 'yourSelect' ); var textElement = document.getElementById ( 'yourTextBoxID' ); textElement.value = selectElement.options[selectElement.selectedIndex].value; }
        -------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us! -- modified at 8:53 Friday 28th April, 2006

        1 Reply Last reply
        0
        • S sudharsong

          hi all, for the above problem,i didn't mentioned my code. im using this one.someone tell me what i have to do function fnOnchange(){ var ddobj=document.getElementById("<=%DDL2 %>"); var txtobj=document.getElementById("<=%TextBox1%>%"); txtobj.value=ddobj.Options[ddobj.SelectedIndex].value; return true; // txtobj.value=ddobj.SelectedIndex.value; } hi to all with regards, susa

          C Offline
          C Offline
          CWIZO
          wrote on last edited by
          #4

          put a onchange attribut into your select box : ... and then write a JS function:function copyEmail () { var selectElement = document.getElementById ( 'yourSelect' ); var textElement = document.getElementById ( 'yourTextBoxID' ); textElement.value = selectElement.options[selectElement.selectedIndex].value; }
          -------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

          S 1 Reply Last reply
          0
          • C CWIZO

            put a onchange attribut into your select box : ... and then write a JS function:function copyEmail () { var selectElement = document.getElementById ( 'yourSelect' ); var textElement = document.getElementById ( 'yourTextBoxID' ); textElement.value = selectElement.options[selectElement.selectedIndex].value; }
            -------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

            S Offline
            S Offline
            sudharsong
            wrote on last edited by
            #5

            hi CWIZO, you helped me a lot cause the code you given is working great.thank you very much. with regards, susa

            C 1 Reply Last reply
            0
            • S sudharsong

              hi CWIZO, you helped me a lot cause the code you given is working great.thank you very much. with regards, susa

              C Offline
              C Offline
              CWIZO
              wrote on last edited by
              #6

              Hey no problem ;) -------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

              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