Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

Have Programming Question? Ask it here!
 
 
 


himanshu jaiswal
store value in checkbox from gridview
0 Answer(s)      a year and 5 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>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
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
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
Advertisements
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 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
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
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
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><
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
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="
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 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
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
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
Store combo box value - Development process
Store combo box value  Hi , this is my code. Here wen i click submit button combo values are stored like 1,2,3... but i want to store value . plz send me code. while validating a form, i have entered data in first field
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
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
I want to store the value of local variable into Global variable
I want to store the value of local variable into Global variable    <%=cnt%>=x; is it a valid Statement
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
store & retrive the image from oracle database
store & retrive the image from oracle database  how can i store the image path in tha database & fetch that image from oracle database
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
How to store two integer value in a separate file and retrieve those values
How to store two integer value in a separate file and retrieve those values  I need to save two values so i can use those values later i came up... can i write and update value in that file
retrieve data from mysql database and store it in a variable ?
retrieve data from mysql database and store it in a variable ?  sir... to store that data in int variable. how to do this ?   Here is an example that retrieve the integer values from the database and stored in the integer
Reading Value From console
Reading Value From console  In case of String data Type readLine method of DataInputStream class read complete line of the given string but the next method of Scanner class doesn't read the complete line of String. why
Reading Value From console
Reading Value From console  In case of String data Type readLine method of DataInputStream class read complete line of the given string but the next method of Scanner class doesn't read the complete line of String. why
store and retrive image from database - JDBC
store and retrive image from database  how to store and retrive an image in database using java?  Hi friend, Code for store image...()); } } } For retrieve image from database visit to : http
how to store and retrieve image from database
how to store and retrieve image from database  how to store and retrieve images into database(oracle) and how to retrive images from database using jsp   Here is a jsp code that insert and retrieve image from mysql
returning a value from Threads
returning a value from Threads  Hello I have worker pattern that uses ExecutorService to schedule Thread execution but getting stuck at some point when returning a value using Future.I have code snippet below: ExecutorService
Code to store sub combo box value - Development process
Code to store sub combo box value  Hi Deepak, In the following code i want to store subcombo box value instead of number. Already "Dkn/Tmz" ,"kungumam... etc are storing but i want to store "Circulation,marketing
Export Extjs Gridview data to excel in jsp
Export Extjs Gridview data to excel in jsp  i need to export the extjs girdview data to excel can you please help me thanks in advance
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
store
store  i want to store data in (.dat) file format using swing and perform operation on that insertion,deletion and update
store
store  hi i want store some information in my program and use them in other method. what shoud i do
access image from ajax store in mysql using jsp
access image from ajax store in mysql using jsp  access image from ajax store in mysql using jsp (code to access image captured by camera and store in mysql
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
How to store extracted values from xml in a database? - XML
How to store extracted values from xml in a database?  I want to store extracted xml values in a database... How can i store extacted xml values in a database... give me a example
How to store extracted values from xml in a database? - XML
How to store extracted values from xml in a database?  I want to store extracted xml values in a database... How can i store extacted xml values in a database... give me a example
Subtract a value in the database from java
Subtract a value in the database from java   Hi, i want to know how to subtract a value on a database. im using JDBC connection from access and i want to decrement the value of table "quantity" of 1 each time it passes a loop my
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
Store image from html img tag into mysql db using java
Store image from html img tag into mysql db using java  Hi. How to get the image displayed in the < img > tag of HTML and store it in the mysql database using java? Thanks in advance
Read the value from XML in java
Read the value from XML in java  Hi, i have an XML... the permissions on that file.So how can i read that value. This is little urgent.... <param name="file" value="D:/Lakki
export value in csv from jsp
export value in csv from jsp  Hi! i have creted a html form using javascript. i hv taken the array values in jsp. nw i want to pass these array values from jsp to csv file. so please help me how to send
Return Value from One Form
Return Value from One Form  I have two buttons in main form client and bank.when i click client button new form will open, in this dedupe button... value of dedupe form and use in bank form..how to do
Retrieve Value from Table - Hibernate
Retrieve Value from Table   Hai friend, I need help, How can i retrieve values From database using hibernate in web Application. As I new to hibernate I couldn't find solution for this problem.. Can anyone help please.. 
how to store and retrieve images int and from the database using php
how to store and retrieve images int and from the database using php  please anyone can help me in storing the images and retrieve it back from the Mysql database using php
 

 

 

DMCA.com