Share on Google+Share on Google+

megha singhal
ftech different value corresponding different value
2 Answer(s)      4 years and 11 months ago
Posted in : JSP-Servlet

in my dropdown two options are their and i want when i select any option the corresponding value that go in the database should be different. for eg. in my drop down there are two optiond like delhi and mumbai so if a person select delhi then entry in database should be 'D' and if any one select mumbai then the entry in the database should be 'M'.

Ads

View Answers

April 24, 2012 at 5:02 PM


Do you want autosuggest or autocomplete box?



April 28, 2012 at 10:59 AM


Use the following code:

<%
String selectedvalue=request.getParameter("select");
char ch=selectedvalue.charAt(0);
String st=Character.toString(ch);
%>

The value st is then inserted into database. It stores the first character of any selected value.










Related Tutorials/Questions & Answers:
ftech different value corresponding different value
ftech different value corresponding different value  in my dropdown two options are their and i want when i select any option the corresponding value that go in the database should be different. for eg. in my drop down
updating rows which contains same id, different value for each row
updating rows which contains same id, different value for each row  ... sid 1) with 'lilitha' as a value for name column second row(having sid 1) with 80 as a value for age column third row (having sid 1) with 'suri' as a value
Advertisements
JDOM Attribute Example, How to convert value of attribute in different data type
JDOM Attribute Example, How to convert value of attribute in different data type In this tutorial, we will see how to retrieve the value of an attribute in different data type like int, float, boolean etc with the help of JDOM
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s the problem?  I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s the problem?  I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s
Different JRE
Different JRE  Java is platform independent. The why different JRE's there for differen operating systems
Array Add Key Value PHP
PHP array add key and value In PHP, key and value plays important role... type where value could be of any type, it may be a string, numeric value, or boolean value. Syntax of PHP array is "index=>value", this indices
DIFFERENT PAGES FOR DIFFERENT USERS ACCORDING TO THEIR ROLE
DIFFERENT PAGES FOR DIFFERENT USERS ACCORDING TO THEIR ROLE  I HAVE A PROBLEM IN PHP CODING PLS HELP ME PROBLEM IS THAT I WANT DIFFERENT PAGES TO VIEW FOR DIFFERENT USERS WHEN THEY LOGIN ACCORDING TO THEIR ROLE IN DATABASE
different JDBC drivers available
different JDBC drivers available  What are the different JDBC drivers available
different kinds of actions in Struts
different kinds of actions in Struts  What are the different kinds of actions in Struts
with a different number, what’s the problem
with a different number, what?s the problem  I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s the problem
with a different number, what’s the problem
with a different number, what?s the problem  I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s the problem
What are the different types of AutoProxying?
What are the different types of AutoProxying?  Hi, What are the different types of AutoProxying? Thanks
java program of different shapes
java program of different shapes  pls help me to get the code of a java program of different shapes using menu
Different between getRequestParameterMap() and getRequestParameterValuesMap()
Different between getRequestParameterMap() and getRequestParameterValuesMap()  What is the different between getRequestParameterMap() and getRequestParameterValuesMap
links with different colors.
links with different colors.  How can I have two sets of links with different colors
What are different normalization forms?
What are different normalization forms?  What are different normalization forms?   Hi, 1NF: Eliminate Repeating Groups- Make a separate... field contains at most one value from its attribute domain. 2NF: Eliminate
JTable hold different components
JTable hold different components  create Jtable with two coloums,one coloumn is combobox and other normal
different Font
different Font        In this program, we are going to give you an example that helps you for the procedure of using various fonts in a pdf document
How to make a button of different behaviour?
How to make a button of different behaviour?  Suppose In a jsp page I have a button SAVE with id="btnSave" value="SAVE" and a javascript function...").value,......); Now I want the SAVE button to be changed to UPDATE button id
different between ntfs and fat
different between ntfs and fat   hello, what is the different between ntfs and fat ???   hello, The major difference between FAT and NTFS is security. If you have FAT partition then Security and Quota tap
Different tables present in MySQL
Different tables present in MySQL  What are the different tables present in MySQL? Which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10))?  
different type input in java
different type input in java  hiiiii... get input different different type like as DataInputStream,Scanner i want to get source code of these all type of input method. thank   Java Read through DataInputStream: import
by value or by reference
by value or by reference  Are objects passed by value or by reference
Object with different data types
Object with different data types  Hello, I need to build a "patient" object that can contain String "name", String "ID", double "weight" and Date "birthDate". Then that object is referenced to the linked list. I know how to use
assign value problums in php
assign value problums in php  I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what?s the problem
different borders
different borders      ...; enter the values in that cell then we create different borders and we also sets the different colors. . Code description  The package we need to import
Write an applet program for displaying 3 different sentences with 3 different colors
Write an applet program for displaying 3 different sentences with 3 different colors  Write an applet program for displaying 3 different sentences with 3 different colors
the value of $$b
the value of $$b  If the variable $a is equal to 5 and variable $b is equal to character a, what?s the value of $$b
PASS value
PASS value  javascript to pass value to other html file
What are different environments to configure hibernate?
What are different environments to configure hibernate?  Hi, What are different environments to configure hibernate? Thanks
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads