Home Answers Viewqa JSP-Servlet how to update combobx's selected value to database with respect toselected multiple checkboxes

 
 


archana pande
how to update combobx's selected value to database with respect toselected multiple checkboxes
0 Answer(s)      3 months and 22 days ago
Posted in : JSP-Servlet

suppose this if form1.jsp in which i am going to display records from database
out.println("<tr><td>"+"<input type='checkbox' id='r1' value="+r+" name='test' >"+"</td><td>"+r+"</td><td>"+pname+"</td><td>"+add1+"</td><td>"+add2+"</td><td>"+land+"</td><td>"+geon+"</td><td>"+geoe+"</td><td>"+plan+"</td>");

 out.println("<td><select name='routecombo'id='routecombo'"+i+"'>");
  ResultSet rs1=ps2.executeQuery("select Route_id from table1");
  while(rs1.next())
  {
  s1=rs1.getString(1);
  out.println("<option value='"+s1+"'>"+s1+"</option>");
  }

 out.println("</select>");
 out.println("</td>");


  out.println("</tr>");


now this is form2.jsp in which i am updating values which is selected from form1.jsp
String languages="";
String box="";
String box1="";
String lang[]=request.getParameterValues("test");
String txt[]=request.getParameterValues("routecombo");

for(k=1;k<=lang.length;k++)
            {
                System.out.println("k: "+k);
                languages+=lang[k-1]+" ";
            }
               System.out.println("chk="+languages);
               int j=0;
                for(t=0;t<txt.length;t++){

                    box+=txt[t];
                    //box1+=txt1[t];
                    //System.out.println("txt="+box);
                    if(!((txt[t]).equals("")))
                    {
                        System.out.println("Route ID");
                        System.out.println(t);
                        System.out.println(txt[t]);
                        String query="update PROFILE set Route_Id='"+txt[t]+"' where Proid='"+lang[j]+"'";
                        System.out.println(query);
                        i=st.executeUpdate(query);
                        j++;
                    }
 System.out.println("txt="+box);
                //System.out.println("txt1="+box1);

        out.println("Data is successfully inserted into database.");
        }
        catch(Exception e){
            e.printStackTrace();
        System.out.println(e);
        }
View Answers









Related Pages:
how to update combobx's selected value to database with respect toselected multiple checkboxes
how to update combobx's selected value to database with respect toselected multiple checkboxes   suppose this if form1.jsp in which i am going to display records from database out.println("<tr><td>"+"<input type
want to ask how to update data for runtime selected multiple checkboxes
want to ask how to update data for runtime selected multiple checkboxes  HI I have one problem I have fetched value from oracle database into grid... have checkboxes for each record when I will select more than one checkboxex
Updating multiple value depending on checkboxes
Updating multiple value depending on checkboxes  Hi .. I want to Update the multiple values of database using checkboxes and want to set the session for selected checkboxes..? please answer if any one knows as soon as possible
Retriving multiple values of checkboxes in struts
Retriving multiple values of checkboxes in struts  how to retrive multiple values of checkboxes of jsp in action class   JSP Retrieve...="lang" value="C/C++">C/C++<br> <input type="checkbox" name="lang
Update value
Update value  How to update value of database using hibernate ?   Hi Samar, With the help of this code, you will see how can update database using hibernate. package net.roseindia.DAO; import
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement - Java Beginners
How to insert multiple checkboxes into Msaccess database J2EE using prepared... statement to do the checked boxes part, I'm not sure how to go about doing... for different subjects, you can insert the multiple subjects in one column
update
update  how can i update multiple records in database using jsp ,servlet and jdbc based on selection of checkbox in jsp
I want to update the multiple values of database depending on checkbox..? Please help me out..
I want to update the multiple values of database depending on checkbox..? Please help me out..   Hi .. I want to Update the multiple values of database using checkboxes and want to set the session for selected checkboxes
how to display selected checkboxes dynamically using jsp
how to display selected checkboxes dynamically using jsp  Hi friends i have a requirement that : in my JSP page i have radio buttons...) is available in DB,the respective radio button should be selected automatically
update database
update database  hi.. i want to know how the valuesof database can... that can be done there then by pressing the update buutton the value can be updated to database
Update value of database using hibernate.
Update value of database using hibernate.  How to update value of database using hibernate?   Hibernate provides facility to update... this by setting the value and calling the update method. session.update(employee
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
Array of checkboxes - Struts
Array of checkboxes  How to handle unknown number of checkboxes using tag in an ActionForm.   Hi friend, Code for multiple checkbox...;%-- html code, etc... --> <%-- create the checkbox and selected
How to pass the value of Selected Value of combo box into sql ??
How to pass the value of Selected Value of combo box into sql ??  My SQL Database Name is MHS, user=root, password=admin,table name is sub_comb... submit i want to display other field. how to get it?? plz help me
Maintaining States of Selected CheckBoxes in Different Pages using dispaly table in struts2
the checkboxes selected across different pages will get submitted. Can somebody help me how to maintain States of Selected CheckBoxes in Different Pages using...Maintaining States of Selected CheckBoxes in Different Pages using dispaly
Display Label and radio buttons runtime with respect to DB values
Display Label and radio buttons runtime with respect to DB values  ... from buttongroup-Y JradioButton from buttongroup-N and i have multiple values. how can we populate the values at front end? Which layout is better one? How
how to update checkbox list in database
how to update checkbox list in database  Issues: i am using... to update one by one but it's not updating by using below code .it's not adding... in the database below logic is working fine by using insert command
Retrieving value from multiple table in database
Retrieving value from multiple table in database  Hi fnds, I want to maintain the financial database of 20 users for 1 year and update the details in jsp page.. so i have decided to maintain the details based on month (because
update multiple rows in jsp - JSP-Servlet
update multiple rows in jsp  Hi I am trying to do a multiple row...,author and title in the database. Follow these steps to update these fields: 1........... Create update.jsp As we have update 3 fields in the database
how to know which jList is selected and according to that fetch the value
how to know which jList is selected and according to that fetch the value ... is selected so that i get the value of employee_id from the correct jList (i.e which is selected) to fetch data from database using selected employee id from selected
The UPDATE Statement
The UPDATE Statement       The UPDATE statement is used to modify the data in the database table through... is used to assign a new value to a selected columns. The statement also uses WHERE
JSP edit multiple rows
JSP edit multiple rows In this tutorial, you will learn how to update multiple records at the same time. The given example retrieves the record from the database into html table and there is a checkbox with each row. If the user
Java JComboBox Get Selected Item Value
how to get the selected item value form JComboBox. javax.swing.JComboBox.... In this tutorial we are discussing about how to store the selected item value of JComboBox into the database table. To store the selected item value of JComboBox
. Display JavaScript dropdown selected value
. Display JavaScript dropdown selected value  How to get the selected...("dropdown").value; alert("You selected : " + dropdownValue); } <... dropdownValue we are storing the selected value by using
how update JTable after adding a row into database
in JTable, and it's OK, but after adding a row into database table does't update. How update JTable after adding a row into database? package djilepak.javaclss.for...how update JTable after adding a row into database  J have two
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
into database in multiple rows..means one value for one row  Hai, I need... table in multiple rows(which means one value for one row). eg: my file containes... stored in database like names(column) siva divya ravi one value for one
Display JSP selected listbox and checkbox in xml-please help me
database. and in final page it should display all selected listbox as well as selected multiple checked checkboxes. Please help in this how to do this.....I am...Display JSP selected listbox and checkbox in xml-please help me  Hi
how to get data from checkboxes - JSP-Servlet
how to get data from checkboxes  hi, i got list of tables on screen by invoking webservices.when the user selects the tables by using checkboxes, i... to that selected tables. please help me.  hi, we can get the selected
The UPDATE Statement, SQL Tutorial
The UPDATE Statement       The UPDATE statement is used to modify the data in the database table through... is used to assign a new value to a selected columns. The statement also uses WHERE
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
how to display textbox value based on selected option value?
how to display textbox value based on selected option value?  Hi,I... on first value I finished above code. ID: xx Name:xx xx is baesd on second and first value. But it is that l can't do that. now, l post my code
Update Profile
. In this section at first we see how the update form is developed after this we will discuss how to develop an action.   Developing an update form  ...; Update Action The Update action is responsible for setting value
JDBC: Batch Update Example
JDBC: Batch Update Example In this tutorial, you will learn how to do batch... concept. We can update multiple rows using single connection in batch update... to the database for execution and it returns an array of update counts if all
Java Multiple Insert Query
and in the other table we will store the multiple selected value of dropdown list...Java Multiple Insert Query In this example we will discuss about how to execute multiple insert query in Java. This example explains you about how
Second tab should only show selected products from first tab
Second tab should only show selected products from first tab  In the javascript, From the comment ââ?¬Â? // live update of how many circlesââ?¬Â...("width","150px"); $('.tabs').tabs(); // live update of how many circles
Java swing: get selected value from combobox
Java swing: get selected value from combobox In this tutorial, you will learn how to get selected value from combobox. The combobox provides the list... imposed an actionlistener on the combobox in order to get the selected value from
TO connect multiple database
TO connect multiple database  How to connect several database from a single application in java depending upon the user input it will connect to that database
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert check box value to the oracle database using jsp? I want to create hotel's...; <td><input name="pack_id" type="type" value
dropdown wth checkboxes - Design concepts & design patterns
want to put checkboxes inside the dropdown,then we can check the options whatever...++){ if(document.form.nums[i].checked) total +=document.form.nums[i].value + "\n" } if(total=="") alert("select scripts") else alert("Selected Values
retaining the selected values in html:select multiple="true" in jsp + collection + struts
, the selected value in the multiple selection box is not retained. I need your... retaining the selected values in html:select multiple="true" in jsp + collection + struts  Hi, I have a multiple selection box in one of the jsp
Statement Batch Update
or updates simultaneously in the database. In this process multiple SQL queries are added in the Statement object and update the records of database simultaneously... with the database then we will execute multiple SQL statement in a batch for updating
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing application.  Hello Sir, I have a java swing application and i... query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing application.  Hello Sir, I have a java swing application and i... query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing application.  Hello Sir, I have a java swing application and i... query acording to the checkbox. whichever checkbox is selected query should
Dynamically display values in dropdown box and then show the selected values as selected by the user which is already stored in the DB
this code it is adding one more value to the dropdown box and showing as selected.... Can you please help me to show more than one value as selected pulling those selected values directly from the Database and not adding to it as an extra one
How to delete and update from Jtable cell in swing app
How to delete and update from Jtable cell in swing app  Hii Sir... the database . I want to remove and delete the same row which is selected for the dletion... cells to database but i am getting following problems Whenever i click
How to update table in Hibernate
How to update table in Hibernate  Hi, I have a table in database that has two fields in it. Student Name and ID, can anyone explain me how to update these tables in Hibernate. Thanks.   Update table query in Hibernate
Update Records in Database
you want to set a new value. In this database, we update a table country... Update Records in Database       The Update Records in database is used to modify

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.