Created
June 9, 2011 18:59
-
-
Save brianjmiller/1017449 to your computer and use it in GitHub Desktop.
YUI AC with function as requestTemplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Y.IC.AutoComplete source: https://github.com/Wiggins/interchange_mvc/blob/master/share/ic/js/autocomplete.js | |
return new Y.IC.AutoComplete ( | |
{ | |
inputNode: input_node, | |
queryDelay: 300, | |
minQueryLength: 6, | |
resultListLocator: "results", | |
source: "/manage/LogisticsZoneServiceMaps/ac?_format=json&service_kind=delivery&", | |
requestTemplate: function (query) { | |
var my_result = 'code=' + query; | |
return my_result; | |
} | |
} | |
); | |
// resulting url: /manage/LogisticsZoneServiceMaps/ac?_format=json&service_kind=delivery&code=code=NW8%209AY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment