yaragallamurali Posted December 22, 2014 Share Posted December 22, 2014 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 More sharing options...
dsonesuk Posted December 22, 2014 Share Posted December 22, 2014 http://www.w3schools.com/tags/tag_datalist.asp Link to comment Share on other sites More sharing options...
yaragallamurali Posted December 22, 2014 Author Share Posted December 22, 2014 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 More sharing options...
niche Posted December 22, 2014 Share Posted December 22, 2014 I think you need an ajax call, but I wouldn't call it simple. http://www.w3schools.com/php/php_ajax_intro.asp Link to comment Share on other sites More sharing options...
yaragallamurali Posted December 22, 2014 Author Share Posted December 22, 2014 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 More sharing options...
niche Posted December 22, 2014 Share Posted December 22, 2014 (edited) 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. Edited December 22, 2014 by niche Link to comment Share on other sites More sharing options...
yaragallamurali Posted December 22, 2014 Author Share Posted December 22, 2014 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 More sharing options...
niche Posted December 22, 2014 Share Posted December 22, 2014 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 More sharing options...
Ingolme Posted December 22, 2014 Share Posted December 22, 2014 This jQuery plug-in meets your requirements: http://harvesthq.github.io/chosen/ Link to comment Share on other sites More sharing options...
suraj123 Posted March 19, 2015 Share Posted March 19, 2015 how to set edit option in HTML STUDENT REGISTRATION FORM CAN ANY BODY SHARE THE CODE Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now