Say this is my autocompletion array:
Pascal
PHP
Lua
JavaScript
ActionScript
Active Server Pages
When I type in ‘a’ now into the autocomplete textbox, it will show Pascal, Lua, JavaScript, ActionScript and ASP. That is because they all have the letter ‘a’ in them. But I only want to display ActionScript and ASP, as they have ‘a’ as the first letter. How is this possible?
I’ve seen this Stack Overflow question, but it seems to be not useful, as I have the data on the page (Pascal, PHP, etc.)
That is based on the way you filter the values from the list. For e.g., if the source is a SQL Server table or view then the filter condition has
and hence you get Pascal, Lua, JavaScript, etc. In which case, you can just remove the earlier ‘%’ to achieve what you need. Hope this helps.