Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    5
    Rep Power
    0

    Exclamation need help in removing textboxes using button

    <script type="text/javascript">
    function generateRow() {
    var d=document.getElementById("div");
    d.innerHTML+="<input type='text' name='sugg'><br/>";
    }
    </script>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="">
    <table>
    <tr>
    <td><label>Question:</label></td>
    <td><input name="qus" type="text" id="qus" /></td>
    </tr>
    <tr>
    <td><label class="sug">Suggestions:</label></td>
    <td>
    <input name="sugg" type="text" id="sugg" />
    </td>
    <td><input type="button" value="Add" onclick="generateRow()"/></td>
    </tr>
    <tr>
    <td></td>
    <td><div id="div"></div></td>
    </tr>
    <tr>
    <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
    </table>
    </form>


    </body>
    </html>



    i got these set of codes above,after adding some textboxes using the add button, i would like to know how to remove it by clicking on another button which is "remove", but i am not sure on how to do it..i need help in this from the professionals..thank you :D

  2. #2
    Join Date
    Jul 2009
    Posts
    5
    Rep Power
    0

    Default

    by the way, i just want to remove 1 text box at a time :) thx

  3. #3
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,233
    Rep Power
    7

Similar Threads

  1. Removing Buttons?
    By Mass Zero in forum Java Applets
    Replies: 10
    Last Post: 10-28-2009, 03:16 PM
  2. Removing Indexes
    By gilbertsavier in forum JDBC
    Replies: 0
    Last Post: 07-17-2009, 07:23 AM
  3. Inserting textboxes
    By r.gnanaprakasam in forum New To Java
    Replies: 0
    Last Post: 04-22-2009, 02:48 PM
  4. trouble in removing a value
    By jacline in forum New To Java
    Replies: 5
    Last Post: 03-20-2009, 05:56 PM
  5. Moving textboxes
    By GabWit in forum New To Java
    Replies: 2
    Last Post: 01-26-2009, 04:07 PM

Posting Permissions

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