No, you aren't doing anything wrong. While the implementation may be
less then optimal, the additional request is by design. It ensures
that the selected value really is a valid match.

If you consider that a bug, please file a ticket:
http://dev.jquery.com/newticket

Jörn

On Fri, Aug 29, 2008 at 4:34 PM, Christos Zisopoulos
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using the bassistance.de jQuery Autocomplete 1.0.2 plugin with a
> simple server data provider and the following snippet of code:
>
>   $('input.autocompletable').autocomplete('/my_data_source', {
>           matchContains: true,
>           mustMatch: true,
>           minChars: 2,
>           cacheLength: 1,
>           extraParams: { kind: 'Address' }
>   }).result(function(event, data, formatted) {
>     $(this).next().val(data[1]);
>   });
>
> It all works fine but upon selecting a value (either using the mouse
> or hitting the RETURN key) the INPUT is populated with the value
> returned by the AJAX search, but then the the AJAX request is repeated
> once more this time with the value that just populated the INPUT.
>
> Any idea why the double GET request? Am I doing something wrong?
>
> I am on jQuery 1.2.6 and the bassistance.de jQuery Autocomplete 1.0.2
> plugin. Problem occurs across all browsers.
>

Reply via email to