Hey everyone,
I'm fairly new to javascript. I hardly ever use it, but my newest project is demanding that I have 'dynamic' drop downs where the user can type in their partial matches.
So, I come across jQuery Autocompletes. Works wonderful, except the framework I am using doesn't like using GET methods and they are less safe than POST data.
So I modified the code of the autocomplete to allow me to send POST data, but I am now stuck getting multiple pieces of POST data to pass to the page. Can someone help me?
How would I pass both {p:q} and options.extraPa rams to the $.post function?
I have tried {p:q} + options.extraPa rams but that only posts "[object Object][object Object]"
any help would be appreciated.
Thank you!
I'm fairly new to javascript. I hardly ever use it, but my newest project is demanding that I have 'dynamic' drop downs where the user can type in their partial matches.
So, I come across jQuery Autocompletes. Works wonderful, except the framework I am using doesn't like using GET methods and they are less safe than POST data.
So I modified the code of the autocomplete to allow me to send POST data, but I am now stuck getting multiple pieces of POST data to pass to the page. Can someone help me?
Code:
$.post(options.url, {p:q}, function(data) {
data = parseData(data);
//addToCache(q, data);
receiveData(q, data);
});
options.extraParams = options.extraParams || {a:1,b:2}; // for example
I have tried {p:q} + options.extraPa rams but that only posts "[object Object][object Object]"
any help would be appreciated.
Thank you!
Comment