Works only for one row

Ads
 

Works only for one row

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.

<%@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

View Answers

Ads









Related Tutorials/Questions & Answers:
Works only for one row
Works only for one row   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. <%@page import="java.util.concurrent.CountDownLatch
add one row after another
add one row after another  how i add one row after another on click of add button $(document).ready(function() { var counter = 2...) { alert("Only 10 textboxes allow"); return false
Advertisements
I have only one day to visit the Jaipur..
I have only one day to visit the Jaipur..  Hi, I have only a day to travel in Jaipur ..hence, bit worried about what to see first
i have one txt field and one button.when i entere any test in testfield then only button should be enabled.
i have one txt field and one button.when i entere any test in testfield then only button should be enabled.  i have one txt field and one button.when i entere any test in testfield then only button should be enabled. i need
i have one txt field and one button.when i entere any test in testfield then only button should be enabled. i need for this
i have one txt field and one button.when i entere any test in testfield then only button should be enabled. i need for this   i have one txt field and one button.when i entere any test in testfield then only button should
value is inserted into the sql table through jsp-jdbc but not getting stored into the data base,only row is increasing.
value is inserted into the sql table through jsp-jdbc but not getting stored into the data base,only row is increasing.  <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8
We just have one file on the hard disk. But we can create directories, sub-directories and files in that file only
We just have one file on the hard disk. But we can create directories, sub-directories and files in that file only  We just have one file on the hard... only
We just have one file on the hard disk. But we can create directories, sub-directories and files in that file only
We just have one file on the hard disk. But we can create directories, sub-directories and files in that file only  We just have one file on the hard... only
row_id
name are same... i hav to change only one name.... is there somthing like rowid etc...row_id  sir i have created a table my_table with two rows n two... the first row and third column's name in sql server 2005 , kindly send me the query
row_id
name are same... i hav to change only one name.... is there somthing like rowid etc...row_id  sir i have created a table my_table with two rows n two... the first row and third column's name in sql server 2005 , kindly send me the query
Hibernate criteria - how to use criteria to return only one element of an object instead the entire object.
Hibernate criteria - how to use criteria to return only one element of an object instead the entire object.  How to use criteria to return only one... projection to select one element of object. Here is an example to retrieve only name
how to read the values for text and csv files and store those values into database in multiple rows..means one value for one row
table in multiple rows(which means one value for one row). eg: my file containes... row.... can any one help in this program? Regards, P.Divya   hi... into database in multiple rows..means one value for one row  Hai, I need
I want to Transfer only 1/3rd of contents from one folder to other but my code is transferring all contents
I want to Transfer only 1/3rd of contents from one folder to other but my code is transferring all contents  private static void copyFilesRecursively(File src, File dest) throws IOException { if (src.isDirectory
I want only one method goes to sleep but both method goes to sleep together
I want only one method goes to sleep but both method goes to sleep... 'o' to win if(PosTable[i][j]!=-1) //if we have 3 in a row...) //if we have 3 in a row if(c[PosTable[i][j]]==0
I want only one method goes to sleep but both method goes to sleep together
I want only one method goes to sleep but both method goes to sleep...' to win if(PosTable[i][j]!=-1) //if we have 3 in a row... have 3 in a row if(c[PosTable[i][j]]==0) //if position
Struts Login Validation. In This code setter of login page is called only one time again it doesnt call it. Why..?
Struts Login Validation. In This code setter of login page is called only one time again it doesnt call it. Why..?  **struts.xml** <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software
jtable-adding a row dynamically
to add one more row dynamically as a new row 4th if the details are large.but every... row a new row 4th row shuld be formed any one can help me...jtable-adding a row dynamically  hi..i am doing a project
delete row
delete row  how to delete row using checkbox and button in php...("sourabh", $link); $rows=mysql_query("select * from sonu"); $row=mysql...;/tr> <?php while($row=mysql_fetch_array($rows)) { ?> <tr>
add image in a row of table
add image in a row of table  i have a table in which i have to add... jLabel.setIcon(new ImageIcon("E:/2.jpg"));.But when i pass this jlabel in the row it shows its properties instead of showing the image...please some one help me on this...my
add image in a row of table
add image in a row of table  i have a table in which i have to add... jLabel.setIcon(new ImageIcon("E:/2.jpg"));.But when i pass this jlabel in the row it shows its properties instead of showing the image...please some one help me on this...my
VoIP Works
VoIP Works How VoIP Works If you've never heard of VoIP...;   How VoIP Works-Busting Out of Long Distance Rates... over Internet Protocol, and how VoIP works is actually quite revolutionary because
Hibernate one-to-many relationships.
Hibernate one-to-many relationships.  How does one-to-many relationships works in hibernate
didSelectRowAtIndexPath deselect row
didSelectRowAtIndexPath deselect row  Hi, In my UITableView application when user taps a row, how to deselect row? Thanks
jtable insert row swing
jtable insert row swing  How to insert and refresh row in JTable?   Inserting Rows in a JTable example
jsp one to one mapping
jsp one to one mapping  how to perform one to one mapping in jsp....code of one to one mapping with .xml file
ModuleNotFoundError: No module named 'row'
ModuleNotFoundError: No module named 'row'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'row' How to remove the ModuleNotFoundError: No module named 'row' error
ModuleNotFoundError: No module named 'row'
ModuleNotFoundError: No module named 'row'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'row' How to remove the ModuleNotFoundError: No module named 'row' error
JTable duplicate values in row
JTable duplicate values in row  JTable duplicate values in row
Hibernate one to one mapping using xml
, In case of one-to-one mapping for each reach in a table there is corresponding only one record in the mapping table. For example employ will have only one current...Hibernate one to one mapping using xml  Hi, How to create hibernate
display the hidden text from that row, when onclick on a row of 1- 10
to 10)in jsp page, when onclick on one of the view row, it has to submit...display the hidden text from that row, when onclick on a row of 1- 10 ... to get the id value of the row I clicked. The problem is everytime I click on any
Insert specific fields into table dynamically for each row.
Insert specific fields into table dynamically for each row.  ... insert there for each row and for each row there is a button "done".if he click on done the values will be inserted into database.Then he enter values for next row

Ads