drop down list onchange event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slekshmipriya
    New Member
    • Mar 2007
    • 7

    drop down list onchange event

    Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

    I have a drop drown list with items 1,2 ,3 etc.
    On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.lookin g forward for a reply.
  • slekshmipriya
    New Member
    • Mar 2007
    • 7

    #2
    drop down list onchange event

    Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

    I have a drop drown list with items 1,2 ,3 etc.
    On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.lookin g forward for a reply.

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      okk...

      put all the fields (Text Boxes or any other controls) hidden.
      and populate all the fileds as visible whenever u want.
      i think u understand my point.
      best of luck.

      kind regards.
      dmjpro.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by slekshmipriya
        Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

        I have a drop drown list with items 1,2 ,3 etc.
        On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.lookin g forward for a reply.
        You can do this using Javascript only. Have a look at document.create Element

        Comment

        • dmjpro
          Top Contributor
          • Jan 2007
          • 2476

          #5
          ohh sorry i forget it.
          u can do using document.create Element.

          kind regards.
          dmjpro.

          Comment

          • slekshmipriya
            New Member
            • Mar 2007
            • 7

            #6
            Originally posted by dmjpro
            ohh sorry i forget it.
            u can do using document.create Element.

            kind regards.
            dmjpro.

            Can u explain it in detail?
            here is my code
            <html>
            <head>
            <script language="javas cript">
            function createTxtbox()
            {
            --------------
            -----------
            }
            </script>
            </head>
            <body>
            <form name="my form">

            <select name="qual_no" id="qual_no" onChange="retur n createTxtbox()" >
            <option value="s" selected>Select </option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            </select></td>
            </form>
            </body>
            </html>

            This is the code and the function createTxtbox() is to be called on the onChange event.and i wanna pass the selected value also so that i can create that much textboxes.pls help me.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Moved from Articles section. Please do not post questions in the Articles section.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Threads merged.

                Comment

                Working...