Home Answers Viewqa JSP-Servlet store value in checkbox from gridview

 
 


himanshu jaiswal
store value in checkbox from gridview
0 Answer(s)      3 months ago
Posted in : JSP-Servlet

Please check the error... 

<%@ page language="java" import="java.sql.*" %>
<%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    Connection con=null;
    ResultSet rst=null;
    Statement stmt=null;

    try
        {
            String a="jdbc:odbc:lib";
        con=DriverManager.getConnection(a);
        stmt=con.createStatement();
    }

    catch(Exception e)
        {
        System.out.println(e.getMessage());
    }

                Statement st = con.createStatement();
                        rst=st.executeQuery("select * from books ");



%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <title>Books</title>
        <script language="javascript">

function validation()
 {
 var count=0;
 for(var i=0;i<document.admin.chbox.length;i++)
 {
 if(document.admin.chbox[i].checked)
 {
 count++;
 }

}

if(count==0)
 {
 alert("check the messages to delete & u had limited msg");
 //document.msgchbox.checkbox.focus();
 return false;
 } 
else
 {
 return true;
 }

}


</script>
    </head>
    <body bgimage="header.jpg">
        <form name="admin" method="post" action="deletepage.jsp" onsubmit="return validation()">
     <center>
            <h1><b><font color="white">Books Available </font></b></h1>
                      <input type="submit" value=" DELETE "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </div>
            <table bgcolor="pink" border="1" cellspacing="0" cellpadding="0">
            <tr>

                            <th bgcolor="darkblue"> <font color="yellow">S No.</font></th>
                                <th bgcolor="darkblue"> <font color="white">Group</font></th>
                <th bgcolor="darkblue"><font color="white">Name</font></th>
                <th bgcolor="darkblue"><font color="white">Author</font></th>
                                <th bgcolor="darkblue"><font color="white">Publisher</font></th>
                                <th bgcolor="darkblue"><font color="white">Edition</font></th>
                                <th bgcolor="darkblue"><font color="white">Copies</font></th>
                                <th>Delete</th>

            </tr>
                <%
                int no=1;

                while(rst.next())

                                {
                %>
                <tr>


                                    <td><%=no%></td>

                  <td><%=rst.getString("group_")%></td>
                                    <td><%=rst.getString("name")%></td>
                  <td> <%=rst.getString("author")%> </td>
                                  <td> <%=rst.getString("publisher")%> </td>
                                  <td> <%=rst.getString("edition")%> </td>
                                  <td> <%=rst.getString("copies")%> </td>

                                 <td><input type="checkbox" name="chbox<%=no%>" value="<%= rst.getString("name") %>" ></td>
                </tr>
                <%



                no++;

                }
    rst.close();
    stmt.close();
    con.close();
%>
            </table>
                        <u><h2><a href="Books.jsp"><font color="white">Back</font></a></h2></u>
                        <u><h2><a href="home.html"><font color="white">Home</font></a></h2></u>
            </center> 
        </form>
    </body>
</html>
View Answers









Related Pages:
store value in checkbox from gridview
store value in checkbox from gridview  Please check the error... = con.createStatement(); rst=st.executeQuery("select * from books...; <input type="submit" value=" DELETE "/>&nbsp;&nbsp
To store value in session & display it
To store value in session & display it  Hello..I m trying to run...="add"> <!-- <input type="checkbox" name="book1cat" value="JSP" />JSP <input type="checkbox" name="book1cat" value="C
Problem to display checkbox item
* from domain where categoryId=1"); while(rs.next()){ %> <tr> <td> <input type="checkbox" name="check" value=<...Problem to display checkbox item  Hi, Following is my code: <
JSP CheckBox
illustrate an elaborate example from 'JSP CheckBox'. To understand and grasp... request.getParameter Values("id") is used to return the value of selected checkbox...="checkbox" name="id" value="Java"> Java<BR> <input type="checkbox
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert...;input name="activity7" type="checkbox" id="act_name" name="act_name" value... <input name="activity" type="checkbox" id="act_name" name="act_name" value
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert...="activity7" type="checkbox" id="act_name" name="act_name" value="caltural_night" />... name="activity" type="checkbox" id="act_name" name="act_name" value="batik
Checkbox Tag <html:checkbox>:
, populated from the specified value or the specified property of the bean .... value The value to be transmitted if this checkbox is checked...Checkbox Tag <html:checkbox>:      
checkbox value in php
checkbox value in php  In my HTML,PHP form ..we have a check box that is working fine. But anyhow i am not able to get the value of it. Can anyone suggest how to get the value of checkbox in PHP
CheckBox in Flex4
CheckBox in Flex4: In Flex 4 the CheckBox Control is comprises from... or not. You can change the value of a  text label to a CheckBox control... .The default value of Checkbox is unchecked. Checkbox value is true when it is checked
jQuery to Select Multiple CheckBox
program that retrieves the value of selected checkbox from server and displays...;checkbox_name" value="English"> English<br> <input type="checkbox" name="checkbox_name" value="Hindi"
jQuery to Select Multiple CheckBox
program that retrieves the value of selected checkbox from server and displays...="checkbox_name" value="English">English<br> <input type="checkbox" name="checkbox_name" value="
how to get the checkbox value in jsp
how to get the checkbox value in jsp  how to get the checkbox value in jsp?   JSP CheckBox Example - how to get the checkbox value in jsp
How to display gridview details to labels dynamically?
How to display gridview details to labels dynamically?  I am using SQLDataSource to connect to MySQL. I have a gridview that retrieves information from MySQL database based on a selected id(dropdownlist). I need to display
store html value in the sqllite 3 php
store html value in the sqllite 3 php  i have a php script that will parse html page content link and view but i need to know how to store... tell db to store html content from $articles $result = $db->query('SELECT bar
How to change the checkbox value dynamically.
How to change the checkbox value dynamically.  Hi, I am using struts 1.2 checkbox tag. Requirement is on page load the value must be "true... the page. Then the checkbox is checked instead it have to show unchecked. And even
how to update checkbox list in database
how to update checkbox list in database  Issues: i am using different checkboxs for getting role then all role list store in one string array i want...= '"+RoleId+"'"; ut.println("row value"+role[j
Displaying checked checkbox in same page as well as print on another page ....also add next pages cheches checkbox into previous list
same checkboxes. So, from your above code, i can display selected checkbox on same... in category wise means..from first page , if we select 4 checkbox and from second...Displaying checked checkbox in same page as well as print on another page
Struts2.2.1 checkbox tag example.
property from the ValueStack.  Directory structure of checkbox tag example...:checkbox name="hello" label="Hello" value="true">...Struts2.2.1 checkbox tag example. In this example, you will see the use
delete multiple row using checkbox
checkbox   We are providing you the code where we have specified only three...=null; st=conn.createStatement(); rs = st.executeQuery("select * from book"); int i=0; while(rs.next()){ %> <tr><td><input type="checkbox" name
read from file and store using hash map
read from file and store using hash map  I was stuck with a java project where I have to read a file with two different concepts and store them... (Key, value) ID, 123 (key, value) Children: Name, abc ID, 321 and so
insert data in the database using checkbox
;input type="checkbox" name="check<%=i%>" value=<%= rs.getString("bookid...insert data in the database using checkbox  i am fetching data from the database using servlet on the jsp page and there is checkbox corresponding
deleting messages using checkbox in JSP
;input type="checkbox" name="inboxchk" value="<%=rs.getInt("omailid")%>">...deleting messages using checkbox in JSP  Am working on a Mail Server... * FROM mstOutbox WHERE fromuid='"+sesUserId+"' AND dstatus='N
deleting messages using checkbox in JSP
;input type="checkbox" name="inboxchk" value="<%=rs.getInt("omailid")%>"><...deleting messages using checkbox in JSP  Am working on a Mail Server... * FROM mstOutbox WHERE fromuid='"+sesUserId+"' AND dstatus='N
How to Store Float Value into Access Database - Java Beginners
How to Store Float Value into Access Database  Hello sir,I want to Store Student Marks Percentage into Access Database in Float Value how i can Store.... To store the double value in Access database, you need to set the datatype
Checkbox Tag (Form Tag) Example
Checkbox Tag (Form Tag) Example       In this section, we are going to describe the checkbox tag. The checkbox tag is a UI tag that is used to render an HTML input element of type checkbox
Displaying search results in same panel of gridview in same jframe window.
Displaying search results in same panel of gridview in same jframe window.  Hello Sir, I have a search frame window from which we can search and see the results in the same panel of the Jframe in Gridview Jtable
Displaying search results in same panel of gridview in same jframe window.
Displaying search results in same panel of gridview in same jframe window.  Hello Sir, I have a search frame window from which we can search and see the results in the same panel of the Jframe in Gridview Jtable
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  how to insert...="center"> <input type="checkbox" name="pmanager" value="Edit...; <input type="checkbox" name="pmanager" value="Deleted" checked><
JSP - Checkbox remain checked although checked values should depend on values stored in a stateful session bean
;input type="checkbox" name="checkBoxes1" value="ITEM 2" <%= checkBox2 %> /> ITEM 2.<br> <input type="checkbox" name="checkBoxes1" value...="checkbox" name="checkBoxes1" value="ITEM 4" <%= checkBox4 %> /> ITEM 4
how to store jtable value in multidimensional array?
how to store jtable value in multidimensional array?   i want to store the value of jtable in multidimensional array,with type double. how to store jtable value in multidimensional array
how to store jtable value in multidimensional array?
how to store jtable value in multidimensional array?   i want to store the value of jtable in multidimensional array,with type double. how to store jtable value in multidimensional array
store dynamic generated textbox value into database
store dynamic generated textbox value into database  sir, how do i store dynamically generated textbox value into the database thanks in advance
i want to store dynamic number of value on one jsp and retrieve them on other.
i want to store dynamic number of value on one jsp and retrieve them on other.  in my problem, i want to run a query from database.then while in loop... the value from each drop down in a different variable. i.e i want to create as many
Dojo Checkbox
a conventional check box. The checkbox contains Boolean types value either 'true...Dojo Checkbox          In this section, you will learn how to create a checkbox in dojo
increamenting the value
increamenting the value  Hi, I am retrieving books name from database and attaching two input tags i.e.One Text area to comment and one checkbox to rate but i am unable to insert the rated n commented rows in database because
checkbox with dropdown listbox in jsp
checkbox with dropdown listbox in jsp  i loaded the the data into the drop down listbox in jsp from access database.now i have to add a check box,if it checked means dropdownlist box carryout the data's,else it should
Batchwise Store
Batchwise Store  i want to read the column from excel and store the data as batchwise into database
code for selected checkbox columns data from database
code for selected checkbox columns data from database  in my page iam getting all column names of a particular table with checkboxes. when iam select one or more checkboxes i have to get data of that selected columns only. what
checkbox
checkbox  how to insert multiple values in database by using checkbox in jsp
store and retrive image from the database
store and retrive image from the database  please provide me... to store and retreive images from sql database using sql commands -how to store and retreive images from sql database using asp.net/c# thanks in advance
How to save and get value from JSP
How to save and get value from JSP  Employee Name Time... 324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes
Maintain checked checkbox status
Maintain checked checkbox status  Hi everyone In my JSP... ultimate aim is to avoid "duplicate " selection of checkbox records . i am stuck with this problem from 2 days . I tried a lot .But please give me example code, so
checkbox selection in jsp
checkbox selection in jsp  hey guys i am working on a web based project using jsp. In my project i am having 9 check boxes in 3 rows in the same form. I want to select i check box from each row and also i want to avoid many
CheckBox in Flex
of the file or from the ActionScript file. Flex Checkbox Control Example: <?xml...Flex CheckBox Control: The CheckBox control of Flex is a very common GUI, which is supported by almost every computer language. CheckBox control is used when
JavaScript Checkbox getElementById
JavaScript Checkbox getElementById...() for checkbox in JavaScript. In the given example we are going to show an image on clicking the checkbox. This is done by using the JavaScript method getElementById
Checkbox pagination problem
Selected Domains " type=checkbox value="${domain.domainName}">...Checkbox pagination problem  HI ., Following is my code test.jsp... checkbox of table"Table Containts" and submit ">>" button, then in "Total
Dojo Tree With Checkbox - Framework
structure in a jsp along with checkbox besides each node. The tree structure... with tree structure. The checkbox will have 3 states: (1) partially checked, (2... (not corresponding to any item in the store) Clicking a folder node
Adding checkbox to List as item
Adding checkbox to List as item   can we add checkox to List  ... getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean hasFocus) { setEnabled(list.isEnabled()); setSelected(((CheckListItem)value
store data from a variable in mysql?
store data from a variable in mysql?  sir last time asked you tell me how to retrieve data from a database mysql and store it in an int variable in order to apply some calculation on it, but now i want to store the result
Code to store SubCombo box value - Development process
Code to store SubCombo box value   Hi ,In the following code i want to store SubCombo box name instead of value for Department Field. Add Data var arr = new Array(); arr["Select"] = new Array("-select-"); arr["Dkn

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.