views:

34

answers:

0

I use autocomplete (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) for jQuery and everything works fine. If I type some letters there are suggestions I can choose from and on TAB or RETURN it performs the function defined with result(). But I know it won't last some days and a consumer of this form won't press TAB or ENTER but will click a submit button - ant there my confusion begins. How can I manage that #input performs a search select the first result and perform the result-function? seems to do that since my js-error-log tells me 'data' (the parameter given to the result-function) is not defined. Of course, because I typed only so many letters the result is identified exactly but not all letters of the entry and the "selectFirst: true"-Property only works when pressing TAB or ENTER.

Did I miss the point or how can I arrange that? Hope someone can point me in the right direction...

Michael