Also, pretty sure you just did it for development purposes, but you
probably shouldn't use an alert in an autocomplete context. :P

On Mar 19, 3:32 pm, ricardobeat <ricardob...@gmail.com> wrote:
> I guess the problem is this line:
>
> var ac = $("#operator")[0].autocompleter.findValue();
>
> $(..)[0] gives you the first HTML Element in the object. It's not a
> jQuery object anymore, so the autocompleter property doesn't exist.
>
> IDs should be unique so that is unneeded, try changing it to
>
> var ac = $("#operator").autocompleter.findValue();
>
> If you had a class or other selector that returns many elements, and
> you just want the first one, you'd use
>
> $(".operator:first").autocompleter.findValue();
> or
> $(".operator").eq(0).autocompleter.findValue();
> or
> $( $(".operator")[0] ).autocompleter.findValue();
> //notice the re-wrapping. this is useful if you already have the $
> ('.operator') object saved in a variable
>
> cheers,
> - ricardo
>
> On Mar 19, 12:37 pm, "brightdad...@googlemail.com"
>
> <brightdad...@googlemail.com> wrote:
> > Thanks for the suggestion Lauri.
>
> > I have tried as asuggested and still dont see anything happening.

Reply via email to