Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function specialSuccessStuff(transport)
- {
- // ...whatever your special onSuccess stuff is...
- }
- function makeRequest(url, options) {
- var orig;
- orig = options.onSuccess;
- if (orig) {
- options.onSuccess = function(transport) {
- specialSuccessStuff(transport);
- orig(transport);
- };
- } else {
- options.onSuccess = specialSuccessStuff;
- }
- return new Ajax.Request(url, options);
- }
Add Comment
Please, Sign In to add comment