I have a website that has lots of prototype.js ajax calls and now we need a function called before each of them. Is there a way to add to the function without actually changing the prototype.js script? Basically we are looking for a way so we don't have to go and update every call.
For example:
OLD:
new Ajax.Request(SOMEURL);
NEW:
somefunction();
new Ajax.Request(SOMEURL);
Is there a way to create the same thing as the NEW, but within the Ajax.Request?
Thanks,