<script language="javascript"> var arr = new Array(); arr["Select"] = new Array("-select-"); arr["Dkn/Tmz"] = new Array("Circulation","Marketting","Advertisment/Billing","Finance","Purchase","Administration","Internet","Business"); arr["Kungumam"] = new Array("Layout","Vannathirai","Vasantham","Aanmegam","Administration","Editorial","Finance"); arr["General"] = new Array("E-Paper","Dotcomm","ABAP","Finance","Purchase","Modem","Datalab","Scanner","QC"); arr["Others"] = new Array("Mercedes","Toyoto","Maruti","Innovo");
function change(combo1) { var comboValue = combo1.value; document.forms["form"].elements["combo2"].options.length=0; for (var i=0;i<arr[comboValue].length;i++) { var option = document.createElement("option"); option.setAttribute('value',i+1); option.innerHTML = arr[comboValue][i]; document.forms["form"].elements["combo2"].appendChild(option); } } function calservlet() { document.submit(); } function selfSubmit() { document.frmIndex.action=""; document.frmIndex.submit(); } function validate(){ if (document.form.ServiceNo.value == "") { alert ( "Please enter first name." ); document.form.ServiceNo.focus(); return false; } if (document.form.Name.value == "") { alert ( "Please enter last name." ); document.form.Name.focus(); return false; } if (document.form.CSNNo.value == "") { alert ( "Please enter username." ); document.form.CSNNo.focus(); return false; } if (document.form.Combo.value == "") { alert ( "Please select the department" ); document.form.Combo.focus(); return false; } if (document.form.IssueName.value == "") { alert ( "Please enter password." ); document.form.IssueName.focus(); return false; } if (document.form.Rem.value == "") { alert ( "Please enter password." ); document.form.Rem.focus(); return false; } if (document.form.SNo.value == "") { alert ( "Please enter password." ); document.form.SNo.focus(); return false; } if (document.form.Prcode.value == "") { alert ( "Please enter password." ); document.form.Prcode.focus(); return false; } if (document.form.Prsolved.value == "") { alert ( "Please enter password." ); document.form.Prsolved.focus(); return false; }
alert("Data is successfully inserted"); return true;
} </script>
May 28, 2009 at 3:36 PM
Hi Friend,
Try the following code:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> <html> <head><title>Add Data</title> <script language="javascript"> var arr = new Array(); arr["Select"] = new Array("-select-"); arr["Dkn/Tmz"] = new Array("Circulation","Marketting","Advertisment/Billing","Finance","Purchase","Administration","Internet","Business"); arr["Kungumam"] = new Array("Layout","Vannathirai","Vasantham","Aanmegam","Administration","Editorial","Finance"); arr["General"] = new Array("E-Paper","Dotcomm","ABAP","Finance","Purchase","Modem","Datalab","Scanner","QC"); arr["Others"] = new Array("Mercedes","Toyoto","Maruti","Innovo"); function change(combo1){ var comboValue = combo1.value; document.forms["form"].elements["combo2"].options.length=0; for (var i=0;i<arr[comboValue].length;i++){ var option = document.createElement("option"); option.setAttribute('value',i+1); option.innerHTML = arr[comboValue][i]; document.forms["form"].elements["combo2"].appendChild(option); } } function calservlet(){ document.submit(); } function selfSubmit(){ document.frmIndex.action=""; document.frmIndex.submit(); } function validate(){ if (document.form.ServiceNo.value == "") { alert ( "Please enter Service No." ); document.form.ServiceNo.focus(); return false; } if (document.form.Name.value == "") { alert ( "Please enter User Name." ); document.form.Name.focus(); return false; } if (document.form.CSNNo.value == "") { alert ( "Please enter CSNNo." ); document.form.CSNNo.focus(); return false; } if (document.form.Combo.value == "") { alert ( "Please select the department" ); document.form.Combo.focus(); return false; } if (document.form.IssueName.value == "") { alert ( "Please enter issue ." ); document.form.IssueName.focus(); return false; } if (document.form.Rem.value == "") { alert ( "Please enter remark." ); document.form.Rem.focus(); return false; } if (document.form.SNo.value == "") { alert ( "Please enter sno." ); document.form.SNo.focus(); return false; } if (document.form.Prcode.value == "") { alert ( "Please select problem code." ); document.form.Prcode.focus(); return false; } if (document.form.Prsolved.value == "") { alert ( "Please select." ); document.form.Prsolved.focus(); return false; } return true; } </script>
String sql = ("INSERT INTO Add_Data VALUES ('" + Service_No + "','" + UserName + "','" + CabinetSerialNo + "','" + Department + "','"+ Issue +"','"+ Remark +"','"+ SlForNew_Alternative +"','"+ ProblemCode +"','"+ ProblemSolved +"')"); statement.executeUpdate(sql); out.println("Data is inserted into the database"); statement.close(); connection.close(); %> Thanks Roseindia Team
Related Pages:
Store combo box value - Development process Storecombobox value Hi , this is my code. Here wen i click submit button combo values are stored like 1,2,3... but i want to storevalue . plz... = request.getParameter("Combo");
String Issue = request.getParameter("IssueName");
String
Code to store sub combo box value - Development process
Code to store sub combobox value Hi Deepak, In the following code i want to store subcombo boxvalue instead of number. Already "Dkn/Tmz" ,"kungumam... etc are storing
but i want to store "Circulation,marketing
how to get combo box value - JSP-Servlet
how to get combobox value i have created 1 servlet & 1 jsp page... in combobox in jsp page:
(small part of my code)
">
now i want... to store that id in database. how to get that value??? Hi Friend
combo box value comboboxvalue i want to populate one comboboxvalue based on another comboboxvalue using ajax
1)country.jsp:
<%@page...' onchange="showState(this.value)">
<option value="none">
combo box value comboboxvalue i want to populate one comboboxvalue based on another comboboxvalue using ajax
1)country.jsp:
<%@page import...' onchange="showState(this.value)">
<option value="none">
Combo box value Error - WebSevices Comboboxvalue Error
if($_SERVER['REQUEST_METHOD'] == 'POST...']);
}
document.frmProposal.hdVisa.value = document.getElementById('cmbVisa').value;
Error: The "cmbVisa" Value is Null,This error will displayed for these coding.So tell me
Loading combo box from oracle
Loading combobox from oracle how can i load values into a combobox from oracle database when a value is selected in another combobox
combo box code problem combobox code problem in this my problem related to :
when i... stores the option value no like MP at option value 10 then it will stores the 10... = document.createElement("option");
option.setAttribute('value',i+1
How to pass the value of Selected Value of combo box into sql ??
How to pass the value of Selected Value of combobox into sql ?? My SQL Database Name is MHS, user=root, password=admin,table name is sub_comb(regno,sname,sgen). Now i want to select one "regno" from Combobox and then after
Dojo Combo Box
Dojo ComboBox
In this section, you will learn what is combobox and
how to create a combobox in dojo. For creating the Combo box you need "
JavaScript Dynamic Combo Box
JavaScript Dynamic ComboBox
Here we are going to create dynamic combobox... in respective arrays. As the user
selects a country from the first combobox, the cities...:
On selecting the value from the first combo, related values will get
displayed
how to create a combo box in html
how to create a combobox in html <tr>
<td>Number<span class=mandatory>*</span></td>
<td>
<select name="number" id="course" style="width:158px;">
<option value="none">----Select
Code to store SubCombo box Name - Development process
Code to store SubCombo box Name Hi, In the following code i want to store Sub-combobox(Second combo in Department field) name instead of value. plz send me code tfor that
Add Data
var arr = new Array();
arr["Select
Code to store SubCombo box value - Development process
Code to store SubCombo boxvalue 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
How to create Combo Box in SWT
How to create ComboBox in SWT
This section illustrates you how to create a combobox... an action on the second combobox. The items tea ,
coffee and cold drink
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using comboboxvalue in jsp? I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all are satisfaction in this form.. What will i do. My code is following
How to retrieve data using combo box value in jsp? - JSP-Servlet
How to retrieve data using comboboxvalue in jsp? Hi freind,
I already post this question. I need urgent help from u. pl response me.... All actions in the same page....... Hi Friend,
Please visit
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using comboboxvalue in jsp? Hi Friends......
For Example, in Student.jsp... when i click student id in combobox... in combobox from database.. by using select*from studentinformation;
But when i
Combo Box operation in Java Swing
holds the integer value for the
position number of he of the item in combobox... ComboBox operation in Java Swing
 ... the ComboBox component, you will learn how to add items to the
combobox
How to retreive data by using combo box value - JSP-Servlet
How to retreive data by using combobox value I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all are satisfaction in this form.. What will i do. My code is following
combo box combo box Hi,
[_|] dropdown box
[ ] [INCLUDE... a screen like this using jsp-servlet(or DAO,DTO),in that drop down box i should get
JavaScript Combo Box Validation
JavaScript ComboBox Validation
This application illustrates how to validate the combobox using JavaScript
validation.
In this example we create a combobox of different
Populate a combo box using data from a database
Populate a combobox using data from a database Hi Guys, In need... combobox which will then load the
next combobox values,
now i know how... to the client using ajax, and then populate the combobox, I must'nt reload
combo box - JSP-Servlet combo box how to get a combobox in jsp page which allows editing as well as list box
populate Combo Box dynamically
populate ComboBox dynamically Hi,
How to populate the ComboBox dynamically using Flex with Jsp's
date in combo box
date in combo box strong texthello,
how can i desplay the current year and next year in combobox???!!!
it must be uppdate atumaticaly every year>>>
java combo box
java combo box how to display messagedialogbox when the combobox is null,
Thanks in advance
Combo Box - Struts Combo Box I hava acombo box cnnected to my database via html collections. When selecting an option, i want to display specific parts (sectons) on my web page....am trying to use logic:present and logic:empty but its not working
Acees data from database using combo box - JSP-Servlet
the data from database when i select combobox combo2 having values Arts, Commerce, Science. this combobox will appear when first combobox class_name having value 11 or 12, otherwise combobox combo2 remain hide.
Here is JSP's files
How to get the values from the Combo Box - JSP-Servlet
,
Actually i am getting the values in the combobox from table.I want what ever the value i select in combobox its corresponding records will display in their respective text box.
e.g suppose i select ram values from the combobox and its
combo box connection combobox connection how to provide connection between three combo boxes,if my 1st combobox is course and 2nd combobox is semester and 3rd combobox is my subjects.what's the coding to provide the connection between this three
populating the combo box - Struts
populating the combo box Hi
I am having problem populating the combobox with a table in MS SQL Server 2005 Management Studio Express.
Belo is the extract from the Struct?jsp application.
Sector
Helps with combo box and frame
Helps with combobox and frame Hi
i have a combobox and when i click... on the second window and click confirm i would have the information on the combobox.
i... combo;
JTextField txtBox;
private String PersonViewing;
private String
combo box - JSP-Servlet combo box I am using a JSP form in which a combobox is given and I want to populate data in it from database and on the basis of yhe selected item I want to display related data in a textbox Hi Friend,
Create
Problem With Combo Box Editable Property
Problem With ComboBox Editable Property Hi I am new To Flex
i had set ComboBox Editable Property as true.
But I didn't get the property filtering in the combobox
like when you enter text "S" in the combobox then the names
Dynamic loading of Combo box list using servlet - JSP-Servlet
Dynamic loading of Combobox list using servlet I have the category...
I give theortical descrption read it!
Select a value from drop dwon box, retrive it in a servlet,
By using this value communicate to the data base
retrieving from oracle database using jsp combo box
retrieving from oracle database using jsp combo box hi this is my... error = "";
if (!(document.getElementById("startpath").value... = "";
if (!(document.getElementById("stoppath").value)) {
fld.style.background = '#F0F0F0
jtable combo - Java Beginners
click on a particular cell of jtable i want to display the combobox...() == e.VK_ENTER) {
Object value = comboUi.getList().getSelectedValue... getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
int row, int
Dojo Combo Box
Dojo ComboBox
 ... box and
how to create a combobox in dojo. For creating the Combo box you need "dijit.form.ComboBox".
ComboBox: A
combobox is a graphical user