diff --git a/jquery.fcbkcomplete.js b/jquery.fcbkcomplete.js index 2284d01..6664b60 100644 --- a/jquery.fcbkcomplete.js +++ b/jquery.fcbkcomplete.js @@ -478,7 +478,15 @@ var getBoxTimeoutValue = getBoxTimeout; setTimeout( function() { if (getBoxTimeoutValue != getBoxTimeout) return; - $.getJSON(options.json_url, {"tag": xssDisplay(etext)}, function(data) { + + if (typeof(options.additional_params) == "function") { + datadir = options.additional_params() + } + else{ + datadir = options.additional_params() + } + datadir[options.json_tag] = xssDisplay(etext) + $.getJSON(options.json_url, datadir, function(data) { if (!isactive) return; // prevents opening the selection again after the focus is already off addMembers(etext, data); json_cache_object.set(etext, 1); @@ -494,6 +502,8 @@ var options = $.extend({ json_url: null, + json_tag: "tag", + additional_params: {}, width: 512, cache: false, height: "10", @@ -627,4 +637,4 @@ return this; }); }; -})(jQuery); \ No newline at end of file +})(jQuery);