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



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

Have Programming Question? Ask it here!
 
 
 


archana pande
how to update combobx's selected value to database with respect toselected multiple checkboxes
0 Answer(s)      a year and 6 months 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);
        }

Advertisement
View Answers

Related Tutorials/Questions & Answers:
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
Advertisements
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
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
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
how to update the value of jslider
how to update the value of jslider  hello, I want to make a audio player but the jslider is not updating help me
how to update the value of jslider
how to update the value of jslider  hello, I want to make a audio player but the jslider is not updating help me
how to update the value of jslider
how to update the value of jslider  hello, I want to make a audio player but the jslider is not updating help me
how to update the value of jslider
how to update the value of jslider  hello, I want to make a audio player but the jslider is not updating help me
how to update the value of jslider
how to update the value of jslider  hello, I want to make a audio player but the jslider is not updating help me
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
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
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
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
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
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
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
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 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
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
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
fetch database value to text box based on selected value my code given below pls correct my code
fetch database value to text box based on selected value my code given below...="destination" onchange="getPrice()"> <html:option value="0">...;<input type="text" value =" " property= "amount" id='pricecheck'/> <
fetch database value to text box based on selected value my code given below pls correct my code
fetch database value to text box based on selected value my code given below...="destination" onchange="getPrice()"> <html:option value="0">...;<input type="text" value =" " property= "amount" id='pricecheck'/>
How to store JComboBox selected Item into Ms Access Database - Java Beginners
How to store JComboBox selected Item into Ms Access Database  How to store JComboBox selected Item into Ms Access Database.  Hi Friend, Try the following code: import java.sql.*; import javax.swing.*; import
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 djile pak.java...how update JTable after adding a row into database  J have two
How to save JCombobox Selected Item in to Access Database - Java Beginners
How to save JCombobox Selected Item in to Access Database  How to save JCombobox Selected Item in to Access Database  Hi Friend, Try the following code: import java.sql.*; import javax.swing.*; import
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
. 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 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
how to make JTable to add delete and update sql database table
how to make JTable to add delete and update sql database table  Hello all I want to know how to make JTable to act actively to add delete and update database table. i am struck ed here from long time please help me
How to update record to database? I have trouble with the following code
How to update record to database? I have trouble with the following code  I have written the update statement but it still not work to update... mysql<em>selectdb($database_con, $connection); $emailAddress=$_POST
how do i update my database with the help of update syntax in html <text/javascript>? How to write 'where' statement in this?
how do i update my database with the help of update syntax in html ? How to write 'where' statement in this?  var sqlmek="update into Student_info... ActiveXObject("ADODB.Recordset"); alert('How are you!!'); cn.Open(strConn
update the selected records from view immediatly
update the selected records from view immediatly  Hi I am extracting data form sql view to Excel(2007). I want update the Flag field (CHAR 1)in one... update the records immedialty in view as soon as see the data form view. Thank
How to update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  Hello Sir, I am working on a project in which i have to fetch the values from database to jtable .Now as per my requirement i need to update and delete the database
How to update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  Hello Sir... from database to jtable .Now as per my requirement i need to update and delete the database records from the table cells by entering new values there only
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc  how to make a radio button selected when retrieving data from database using struts framework and spring jdbc
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to update
how to update   conditional update
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 update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  hello Sir... from database into jtable of a jpanel.. Now Sir, According to my need i have to update the cell values from there only means that whatever values i ma entering
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
update mysql database
update mysql database  update mysql 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
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
how to upload multiple files in jsp and saving the path in database and the file in folder
how to upload multiple files in jsp and saving the path in database and the file in folder  how to upload multiple files in jsp and saving the path in database and the file in folder I have created a form for the upload of files
Advertisements
 

 

 

DMCA.com