I used JQuery-Autocomplete with Zend for a project couple of months ago. Here is how I wrote up the source, hope it helps.
$( "#unit_autocomplete" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: 'http://localhost/becasPropias/public/unit/autocomplete/format/json'+
'/type/'+type+'/term/'+request.term,
dataType: "json",
success: function( data ) {
$("#unit_autocomplete").removeClass('ui-autocomplete-loading');
},
error: function(jqXHR, textStatus, errorThrown ){
$("#unit_autocomplete").removeClass('ui-autocomplete-loading');
}
});
},
minLength:2,
select: function(event, selectedItem) {
toggle('hidden_unit', selectedItem['item']);
},
open: function() {
$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
},
close: function() {
$( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
}
});
Out of this whole code, here is the part that interests you:
source: function( request, response ) {
$.ajax({
url: 'http://localhost/becasPropias/public/unit/autocomplete/format/json'+
'/type/'+type+'/term/'+request.term,
dataType: "json",
success: function( data ) {
$("#unit_autocomplete").removeClass('ui-autocomplete-loading');
},
error: function(jqXHR, textStatus, errorThrown ){
$("#unit_autocomplete").removeClass('ui-autocomplete-loading');
}
});
}
And out of this code
url: 'http://localhost/becasPropias/public/unit/autocomplete/format/json'+
'/type/'+type+'/term/'+request.term,
As you see, you can put in the url as you need. The code for this is available in my git account.