Hi manuel,

the autocomplter check on the string you enter in the array, not
inside the generate code.
I only think to one thing, delete the HTML markup inside the
autocomplter.
this autocompleter does almoth the same as yours:
new Autocompleter.Local('search_stpr', 'div_search_stpr',['WI -
Wisconsin','GA - Georgia','MD - Maryland','ME - Maine'],
{fullSearch:true});

But if you still need some styling, just set the HTML code and styling
will match elements by using CSS selectors. But in that case if you
still enter sp, spa, span, all elements are returned

There is the possibility to pass instead of the array of possibles
values a function which will do the checking, but that more difficult.

Or one possibility is to set the partialSearch parameter to false so
that the autocompleter will only check at the beginning of the string
to find a match. but entering 3 letter will have no effects. Or invert
the initial of the state with it's name, and style by defaul the name
and add some HTML code to style the initial (the partialSearch
parameter is still set to false).

hope that help.

--
david

On 18 nov, 15:44, Manuel Corrales <manuelcorra...@gmail.com> wrote:
> Hello, I am using a local autocomplete and everything is working fine
> except when I search using the IN letters. When I search like that,
> the drop down menu show the first match and then other 9 items that do
> not match the search. This is only happening with this string. I think
> this maybe because I have this setup and the word "informal" is in all
> items? How can I solve this?
>
> new Autocompleter.Local('search_stpr', 'div_search_stpr', ['WI<span
> class="informal"> - Wisconsin</span>','GA<span class="informal"> -
> Georgia</span>','MD<span class="informal"> - Maryland</span>','ME<span
> class="informal"> - Maine</span>',....], {fullSearch:true});
>
> Thanks in advance!!

--

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.


Reply via email to