Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I use input type text in form..and use autocomplete..when i press mum , i get list with

Mumbai(Bom)
Mumbra (Mum)


now from above, i select Mumbra (Mum)
in input text it shows, Mumbra (Mum), and when i click search,
it passes in form action as Mumbra (Mum) , but i want to pass Mumbra in value of input text but display in text as Mumbra (Mum)

how to do this
Posted
Comments
joginder-banger 10-Jan-14 6:13am    
what's you try man....share your coding parts..
maulikshah1990 10-Jan-14 6:14am    
i did not get any code ..thatswhy i ask you'all
is the above possible ????
Killzone DeathMan 10-Jan-14 6:22am    
You can update the list:
-Mumbai
-Mumbra
instead of:
-Mumbai(Bom)
-Mumbra (Mum)

The it shows in input text "Mumbra" and passes the value as "Mumbra" just like you want!
For a question without code, there must be an answer without code :P

1 solution

Use one of the methods of the String class[^] to split the text into the parts you want. You can then pass just the part that you need for the search, while leaving the original in your text or combo box.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900