Guest User

Untitled

a guest
May 26th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. function onSuccessWrapper(orig, transport)
  2. {
  3. // ...whatever your special onSuccess stuff is...
  4.  
  5. // Chain to original onSuccess handler
  6. orig(transport);
  7. }
  8.  
  9. function makeRequest(url, options) {
  10.  
  11. options.onSuccess = (options.onSuccess || Prototype.emptyFunction).wrap(onSuccessWrapper);
  12. return new Ajax.Request(url, options);
  13. }
Add Comment
Please, Sign In to add comment