I need to add a spinning wheel (loading bar) on an Ajax request done thru Prototype's Scriptaculous' Ajax.Autocompleter . But unfortunately I've never worked with these frameworks... and there's no way, in this case, to switch to jQuery... Documentation is poor and couldn't find nothing on net.
Code below, is part of Magento js.js file ( http://pastebin.com/UUAEEAkR ) line 339 ( I've tried to add a onLoading before onShow but nothing happened... so I don't really know what to do )
initAutocomplete : function(url, destinationElement){
new Ajax.Autocompleter(
this.field,
destinationElement,
url,
{
paramName: this.field.name,
method: 'get',
minChars: 2,
updateElement: this._selectAutocompleteItem.bind(this),
onShow : function(element, update) {
Effect.Appear(update,{duration:0});
}
}
);
},