I have a table that displays data from a database. The table has 3 columns, first one being the Checkbox.\[code\]<sql:setDataSource var="datasource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/PhoneBookDB" user="root" password="12345" /><sql:query var="pbook" dataSource="${datasource}"> SELECT * FROM phoneBook</sql:query><html:form action="/PhoneBookAction.do" method="post" > <table align="center" bgcolor="Khaki" border="5" bordercolor="SaddleBrown" cellpadding="10"> <thead> <tr> <td align="center" ><b>Select</b></td> <td align="center" ><b>Name</b></td> <td align="center" ><b>Phone Number</b></td> </tr> </thead><c:forEach items="${pbook.rows}" var="row"> <tr> <td align="center"> <input type="checkbox" align="middle" name="record" value="http://stackoverflow.com/questions/15609830/${row.id},${name},${pNum}"> </td> <td> <input type="text" name="name" maxlength="30" value="http://stackoverflow.com/questions/15609830/${row.c_name}" > </td> <td> <input type="text" name="pNum" maxlength="10" value="http://stackoverflow.com/questions/15609830/${row.p_num}"> </td> </tr></c:forEach> </table> <html:submit property="method" value="http://stackoverflow.com/questions/15609830/Edit" /> <html:submit property="method" value="http://stackoverflow.com/questions/15609830/Delete" /></html:form>\[/code\]I want users to be able to UPDATE the values of columns Name and Phone Number from the JSP itself. I have no clue about how I can set the updated value in the textbox to the checkbox's value attribute , so that the updated value can be sent to a servlet and then a model, for operation on the DB.
I want to solve this without using JavaScript.
Kindly help! Thank you...
I want to solve this without using JavaScript.
Kindly help! Thank you...