In the cose below I am fetching & displaying result set in a table format.
This table also contains 2 buttons Udate & Delete.
Following are the issues:
1. When user clicks update, I want to send E_ID to Update.jsp.
I want to know, how to send Only E_ID without using form.
2. When user clicks delete, that record is deleted and a message "Record Deleted" is displayed on the same page.Please Help
query="Select * from emp1";
rt=st.executeQuery(query);
out.println("<html><body><table border=\"1\">");
out.println("<tr> " +
"<th> E_ID </th>" +
"<th> E_Name </th>"+
"<th> E_Address</th>" +
"<th> E_Dept </th>"+
"<th> Edit </th></tr>");
while(rt.next())
{
out.println("<tr>" +
"<td>" + rt.getString("E_ID") + "</td>" +
"<td>" + rt.getString("E_Name") + "</td>" +
"<td>" + rt.getString("E_Address") + "</td>" +
"<td>" + rt.getString("E_Dept") + "</td>" +
"<td> <input type=\"button\" name=\"Update\" value=\"Update\">"+
"<input type=\"button\" name=\"delete\" value=\"Delete\"> </td></tr>");
}
out.println("</table><br/>");