I seem to be having some difficulty using autocomplete from jQuery UI which is packaged in confluence 3.5.3. It appears that the "source" parameter is being ignored. Firebug shows my requests as a relative request to the following location:
%5Bobject%20Object%5D
I can get the same thing if I type this request:
jQuery.post({
url : "testUrl.php",
});
The request 404s but the url is inforrect. I'm guessing this must be a bug with the jQuery version confluence 3.5.3 is using? Anybody else experience this issue or have a work-around? Or can I use any autocomplete library confluence is already using? Here's my autocomplete code:
jQuery(".myautocompletes").autocomplete({
source:function( request, response ) {
jQuery.ajax({
url: AJS.Data.get("context-path") + "/plugins/myAction/myAction.action",
dataType: "json",
data: {
term: request.term
},
success: function( data ) {
return response;
}
});
},
minLength: 2
});
(I've also tried with 'source: "/plugins/myAction/myAction.action"'.)
Community moderators have prevented the ability to post new answers.
I've realized the autocomplete I was using was Atlassian's which is actually used to find users. From the minimized code it looks like I won't be able to re-use it so I'm going to use this instead:
http://www.codenothing.com/archives/jquery/auto-complete/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.