How do I get a button "update" in a table to populate fields input text fields in a form

form controls , html controls , html buttons on click commands , table row editing London, United Kingdom
  • 11 years ago


    Can anyone please help me in getting a button 'update' in a table to populate fields in input text fields in a form. This may sound silly but a huddle for me as a new graduate so far.. thanks!!!

    *I want to edit items on the table a table *I have decided to grab the items to be edited by and update button *This 'update' button should then populate my form, which I originally use to add the items to the table

    Bellow is my sample jps page with all form controls

            <%@ taglib prefix="c" uri=""%>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
            <html xmlns="" xml:lang="en" lang="en">
            <title>List Contacts</title>
            <link rel="stylesheet" type="text/css" href="css/springTest.css" />
            <h1>List Contacts</h1>
            <!--reload button outside form to enable reload with out postback of data-->
            <button><a style="color: red;" href="index.jsp">Home</a></button>
            <!--form controls for inputs-->
            <form action=" " method="post">
            <h5 style="color: red">Please enter new contact details below</h5>
            <h5>Contact Name: <input type="text" name="_name"><br>
            <h5>Contact Number: <input type="text" name="_number" size="20"></h5>
            <input type="submit" value="submit" onclick=index.jsp;;>
            <input type="reset" value="Reset">
            <!--table construction for display List-->
            <form action="">
            <table class="list">
                	<th style="width: 200px;">Name</th>
                	<th style="width: 150px;">Number</th>
                <c:forEach var="contact" items="${contactList}">

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann