"extra_var" does not map to the ID of the input field. It is the name
that is going to be sent along with the AJAX request to your script.
(e.g. /autocomplete_lookup/?
q=my_search_text_blahablhablah&extra_var=12345)

You have to change it so it's:
'extra_var': function() {
    return $("#extra_var").attr('id');
}


On Sep 26, 8:39 am, patrickk <patr...@vonautomatisch.at> wrote:
> I´m a bit confused, because the following doesn´t seem to work and I
> have no idea why ... after searching google for a couple of hours and
> trying different solutions, I´m posting this here and hope that
> someone can help.
>
>     $("input.vAutocompleteField").autocomplete('/
> autocomplete_lookup/', {
>         highlight: false,
>         mustMatch: false,
>         matchContains: true,
>         cacheLength: 20,
>         minChars: 2,
>         extraParams: {
>             'extra_var': function() {
>                 return $(this).attr('id');
>             }
>         }
>     });
>
> "extra_var" should be the ID of the current input-field.
>
> this is probably just me don´t seeing what´s wrong ... so any help is
> appreciated.
>
> thanks,
> patrick

Reply via email to