ok, so according to the documentation you should be able to attach dynamic parameters to "extraParams" like so.....
$("#states").autocomplete(url, {
extraParams: {
country: function() { return $("#country").val(); }
}
});
Well can some please tell me why when i do this.....
- var options = {
extraParams: { 'searchBy':function(){return 'page';},
'returnFormat':'endline',
'overrideQueryLimit':true
},
selectFirst: true,
minChars: 3
}
I look at my firebug xmlhttprequest and under the searchBy param i see
-
|
function () { return "page"; } |
When it really should be the value "page". I have this hard-coded to see if i could get it to work, but i would actually like to use a selector. What could be the problem?
Part 2 of my issue/question is that every time i try to bind result(), to be able to handle after user clicks list item, it says that result() undefined, which is really suspect. I cannot figure these problems out and without both these features, i wont have any use for this plugin. Please someone help me. If its any help, im using jquery 1.3 in no conflict mode.