offner / jquery-editable-select Goto Github PK
View Code? Open in Web Editor NEWA drop down list that allows a custom entry
A drop down list that allows a custom entry
A jQuery plugin that adds a user entered value to a select element. How it works: 1) The select element's options are copied to a list. 2) A textbox is put in place of the select element. The select is then hidden. 3) When the textbox gains focus the list is displayed. You can choose the option with the mouse or arrow keys. 4) When an item is selected the textbox and the original select element have their values updated. This is important as it allows you to make the select element editable without changing any data binding code which may already be wired to the select element. 5) If a user enters custom text in the textbox an option is appended to the original select element. That option is given the attribute: data-jqes="editable" If another change is made to the textbox this option element is updated to the new value. Other notes: The plugin assumes that if you are allowing a custom entry the option element's values are equal to the text value. The plugin will attempt to display the list without a scroll bar by using space above or below. Preference is given to showing the list under the textbox. Plugin Options: enableiframe - Defaults to false (disabled). Enable for IE 6/7 support.
Hi offner,
Thank you for your great work.
Many thanks, If you correct me or guide me to get rid out of this problem.
When i enter text into the editable select text box, it works properly for the first entered data. When I change the of the same text box, its not working properly. ie., I am not able to read the value.
Please tell me what i am doing wrong?
Please check the screen shot of that element below,
Please let me know If you need more information.
Thanks
Let us assume that we are using more than one editable text box. We can give unique id for select tag.
so that we can get values of selection change. If I am editing the text box, how can i get this value from text box?
Here is my current solution.
var value = $("#selectID").val(); // This is the value from dropdown option.
if (value == null)) {
value = $("#selectID").next().val(); //This is the value from text box.
};
Please correct me if you have better solution. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.