Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5089 closed enhancement (worksforme)

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.

Change History (2)

comment:1 Changed 9 years ago by Scott González

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 9 years ago by tyron

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')
             }
Note: See TracTickets for help on using tickets.