Jump to content

select box with user manually input value


yaragallamurali

Recommended Posts

hi i have a drop down(<select>) in html. but what i need is, the user need to type in the drop down. When user types the first letter it has to display values which starts with that letter so selection will be easy. how can i achieve this? the drop down in html does not allow user to type in the letters so how can i achieve this? Looking out for a simple and solid solution? This requirement is there in many places so kindly help me?

Link to comment
Share on other sites

hi datalist is not helpful because display string and option value have to be different? when display string is selected, only that option value have to be submited just like select box.

 

I have seen this auto select box some where. what they did was they have overlaped the text field and select box. when text is enetered in the text box automatically matching options are displayed in drop down. I dont know exactly but i have seen some thing some where. if anybody have idea please help me.

Link to comment
Share on other sites

i know how to call with ajax. the main point is the user should be able to type the text in the select box ? i am not sure how to do this? the remaining ajax part i know. i need a dropdown box which has option value to be different than display text. in this select box options have to change according to the typed text in the select box. I know how to change the options but how do the user types the text in the select box?

Link to comment
Share on other sites

Is this what you need?

 

http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly

 

EDIT:

 

I don't think it's what you want.

you misunderstood. you are not reading the thread completly. I need a select box where option value is different and option display string is diffrent. The user need to type first few letters then the related options will be shown. user will select one of the value from the options. this is my requirement.

Link to comment
Share on other sites

dsonesuk's #2 is what you need. Just not exactly what you need. That tells me you need to go with ajax or accept a slight imperfection.

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...