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









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
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
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
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
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
how can i define only one method from the interface. - Java Beginners
how can i define only one method from the interface.  If i am having an interface with 3 methods(declaration) . If i want to use only one method for defining without defining the other two methods. if it is possible then tell me
Mysqldump one table - Taking dump of only one table
Use of mysqldump for taking backup of one table In this section you will see the example of mysqldump function which takes the backup of only one table... to take the backup of only one table from the database
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
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
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
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>
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
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
insert and delete a row programmatically
insert and delete a row programmatically  How to insert and delete a row programmatically ? (new feature in JDBC 2.0
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
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
Sql row retrieve - SQL
Sql row retrieve  Sir What are the sql statements so that I can retrieve rows from a table by specifying the row numbers such as row no.5 to 10, row no.13 to 20 like that. thanks Pabitra kr debanth. Guwahati. 
JTable duplicate values in row
JTable duplicate values in row  JTable duplicate values in row
How TCP/IP works ?
How TCP/IP works ?  hello,, Can some body tell me how TCP/IP works?   hii,ADS_TO_REPLACE_1 TCP/IP is just a protocol that allows different nodes on the network/Internet to share resources and without TRANSMISSION
ADD ROW - JSP-Servlet
ADD ROW  Hi Sir, How to use add row and delete row concept in jsp .  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/add-element.shtml Thanks
delete row using id
delete row using id  package pkg2; import org.hibernate.Query; import...(hql); int row = query.executeUpdate(); if (row == 0){ System.out.println("Doesn't deleted any row!"); } else
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
delete row from a table in hibernate
delete row from a table in hibernate  is there method to delete row in a table using hibernate like save(-) to insert row
Digit Only text field
Digit Only text field  How should we accept digits only in a textbox? (using JSTL only, without Javascript
Hibernate one-to-many relationships.
Hibernate one-to-many relationships.  How does one-to-many relationships works in hibernate
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
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
sqlite database delete row
sqlite database delete row  How to delete row from SQLite Database?    NSString *updateSQL = [NSString stringWithFormat: @"DELETE FROM aListDB WHERE id='%@'",details.ids
ModuleNotFoundError: No module named 'aws-works'
ModuleNotFoundError: No module named 'aws-works'  Hi, My Python... 'aws-works' How to remove the ModuleNotFoundError: No module named 'aws-works' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'aws-works'
ModuleNotFoundError: No module named 'aws-works'  Hi, My Python... 'aws-works' How to remove the ModuleNotFoundError: No module named 'aws-works' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'aws-works'
ModuleNotFoundError: No module named 'aws-works'  Hi, My Python... 'aws-works' How to remove the ModuleNotFoundError: No module named 'aws-works' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'only'
ModuleNotFoundError: No module named 'only'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'only' How to remove the ModuleNotFoundError: No module named 'only' error
how to get only checked data
how to get only checked data  my problem is that i have a jsp page... there are checked box corresponding each row. i want that when i click on save button it should redirect only checked data to other jsp page which is connected
Version of com.mobilesolutionworks>works-bolts dependency
List of Version of com.mobilesolutionworks>works-bolts dependency
Version of com.mobilesolutionworks>works-builder dependency
List of Version of com.mobilesolutionworks>works-builder dependency
Version of com.mobilesolutionworks>works-http dependency
List of Version of com.mobilesolutionworks>works-http dependency
Version of com.mobilesolutionworks>works-util dependency
List of Version of com.mobilesolutionworks>works-util dependency
Version of com.mobilesolutionworks>works-widget dependency
List of Version of com.mobilesolutionworks>works-widget dependency

Ads