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 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'.

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.

Ads









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
Different JRE
Different JRE  Java is platform independent. The why different JRE's there for differen operating systems
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
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
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
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
What are the different types of AutoProxying?
What are the different types of AutoProxying?  Hi, What are the different types of AutoProxying? Thanks
by value or by reference
by value or by reference  Are objects passed by value or by reference
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
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))?  
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
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
PASS value
PASS value  javascript to pass value to other html file
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
PHP search data with different format
PHP search data with different format  How to search data with different format in PHP
What are different environments to configure hibernate?
What are different environments to configure hibernate?  Hi, What are different environments to configure hibernate? Thanks
What are the different modules in Spring framework?
What are the different modules in Spring framework?  Hi, What are the different modules in Spring framework? Thanks
keeps coming up with a different number, what’s the problem.
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
keeps coming up with a different number, what’s the problem
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
Min Value
Min Value   How to access min value of column from database table?   Hi Samar, You can access minimum value of column from database...(selectQuery); System.out.println("Min Value : " +query.list().get(0
sentinel value
sentinel value  how to count the number of red cars that assume 10 cars using sentinel value
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
login for different user in the same page
login for different user in the same page  how can i do the login for different user in the same page throug jsp
request object value
. In this application we have a login page. Thr are different text field. when we... request object value for whole application. Problem is..envirement session... request value for whole application without using session,application object. Please
sentinel value
sentinel value  how to count the number of red cars. Assume there are 10 cars.   how to count the number of red cars that assume 10 cars using sentinel value
Merging Two Arrays Of Different Lengths
Merging Two Arrays Of Different Lengths  I have two arrays of different lengths and wants to have merged values into third. The only condition is, I want unique values in it(third array). Thanks In Advance
selected radiobutton to display different page
selected radiobutton to display different page  there are three radio button are there , in that selected button to display different page. when submit it, using struts2 framework . plz help me to how write code
different types of storage devices of a computer
different types of storage devices of a computer  What are the different types of storage devices of a computer?   Magnetic disks, Tapes and DVDs are few examples of storage devices of a computer

Ads