Skip to main content

Search and Top Navigation

#5089 closed enhancement (worksforme)

Opened January 22, 2010 05:54PM UTC

Closed January 28, 2010 06:49PM UTC

Last modified January 30, 2010 03:29PM UTC

Extra parameters in autocomplete

Reported by: tyron Owned by:
Priority: major Milestone: 1.8
Component: ui.core Version: 1.8b1
Keywords: autocomplete extra parameters Cc:
Blocked by: Blocking:
Description

I think there should be an option in autocomplete plugin to send extra parameters to the server. With this option, it's possible to create an unique page that receives all the autocomplete's requests and respond to them accordingly.

I know this ticket does not belong to this section, but I couldn't find another way to post about this plugin.

Attachments (0)
Change History (2)

Changed January 28, 2010 06:49PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

You can perform any action you want using the source option.

Changed January 30, 2010 03:29PM UTC by tyron comment:2

Ok, I know I can do anything with the source option. But suppose I want to use an url as the source (to use AJAX) and I want pass a string and an array to the target.

Withou an specific option, you will have to explicit write the variables and append them to the "source", like:

source: "search.php?my_string=Passed+String&my_array[]=value1&my_array[]=value2";

I guess it would be a lot better with something like the way I posted in forum http://forum.jquery.com/topic/autocomplete-extra-parameters:

source: "search.php",
extraParams: {
                "my_string": "Passed String",
                "my_array": array('value1', 'value2')
             }