Hi,
My below code is working only if there is a single row. could you please help me in doing it for all the rows retrieved from the database.
view plaincopy to clipboardprint?
<%@page import="java.util.concurrent.CountDownLatch"%>
<%@include file="DBCon.jsp" %>
<html>
<head><script type="text/javascript">
function invoke(but)
{
if(but==5)
{
document.abc.action="Users_2.jsp";
}
else if(but==6)
{
document.abc.action="Up_Query_DB.jsp";
}
document.abc.submit();
}
function UnBloc1()
{
document.getElementById("updat1").style.display="block";
document.getElementById("Ans").style.display="block";
}
</script> </head>
<body>
<table border="1px">
<%
try{
ps=con.prepareStatement("Select DBID,Query_Raised,TR from Scope1 where TR!='null' AND (Query_Answered is null OR Count is null)");
rs=ps.executeQuery();
out.println("<b>QueryRaised</b>");
while(rs.next())
{
%>
<tr>
<form name="abc" method="post" action="">
<td><center><input type="text" value="<%=rs.getString("DBID")%>" readonly="readonly" id="xyz" name="xyz" size="100"></center></td>
<td><input type="Submit" value="Resume" name="Resume" id="Resume" onClick="invoke(5)"></td>
<td><input type="button" value="Update Answer" onClick="UnBloc1()"></td>
<td><input type="text" name="updat1" style="display: none" id="updat1" style="border:hidden"/></td>
<td><input type="Submit" value="Submit Answer" style="display:none" name="Ans" id="Ans" onClick="invoke(6)"/>
</td>
</form></tr>
<% }
rs.close();
con.close();
}
catch(Exception e)
{
out.println(e);
}
%>
</table></body></html>
please help me with it.
Thanks