Guest User

Untitled

a guest
May 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function specialSuccessStuff(transport)
  2. {
  3. // ...whatever your special onSuccess stuff is...
  4. }
  5.  
  6. function makeRequest(url, options) {
  7. var orig;
  8.  
  9. orig = options.onSuccess;
  10. if (orig) {
  11. options.onSuccess = function(transport) {
  12. specialSuccessStuff(transport);
  13. orig(transport);
  14. };
  15. } else {
  16. options.onSuccess = specialSuccessStuff;
  17. }
  18. return new Ajax.Request(url, options);
  19. }
Add Comment
Please, Sign In to add comment