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



Home Answers Viewqa JSP-Servlet ftech different value corresponding different value

Have Programming Question? Ask it here!
 
 
 


megha singhal
ftech different value corresponding different value
2 Answer(s)      2 years and 4 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'.


Advertisement
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
links with different colors.
links with different colors.  How can I have two sets of links with different colors
Different between getRequestParameterMap() and getRequestParameterValuesMap()
Different between getRequestParameterMap() and getRequestParameterValuesMap()  What is the different between getRequestParameterMap() and getRequestParameterValuesMap
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
What are the different types of AutoProxying?
What are the different types of AutoProxying?  Hi, What are the different types of AutoProxying? Thanks
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))?  
by value or by reference
by value or by reference  Are objects passed by value or by reference
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
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
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
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
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
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
PASS value
PASS value  javascript to pass value to other html file
html page viewed on different os
html page viewed on different os  The colors on my page look different when viewed on a Mac and a PC
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?  WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP
What are the different functions in sorting an array?
What are the different functions in sorting an array?  What are the different functions in sorting an array
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
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
PHP Value Sorting
PHP Sort By Value: PHP provides many functions to sort an array. We can sort an array by value, key or randomly. But in most of the situations we need to sort an array by value. There are so many functions are available in PHP, some
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
jasper report display in different formats
jasper report display in different formats  how to display jasper report in different formats lik csv,pdf usin jsp code
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
size of different basic data types
size of different basic data types   Write a simple program to find the size of different basic data types in java
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
Set Different Color to different row in Java Program
Java Set Different Color to different row In this section, you will learn how to set different color to table row using java swing.For this purpose, we have.... This class provides the method setBackground() which allow us to set different
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
How to print different Messge for the same NumberFormatException on different cause objects in JAVA?
How to print different Messge for the same NumberFormatException on different cause objects in JAVA?  How to print different Messge for the same NumberFormatException on different cause objects in JAVA? try { int
Different types of web hosting services
Different types of web hosting services  Hi, There are many.... I was browsing their websites but still could not understood the different types of web hosting services. Can anyone explain me different types of web hosting
Advertisements
 

 

 

DMCA.com