Advertisement
AlexWebDevelop

Untitled

Oct 30th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ajaxObj = null;
  2.  
  3. /* Function that starts a new AJAX request. */
  4. function startAjaxReq()
  5. {
  6.   /* If there is an ongoing AJAX request, we stop it now. */
  7.   if (ajaxObj != null)
  8.   {
  9.     ajaxObj.abort();
  10.     ajaxObj = null;
  11.   }
  12.  
  13.   ajaxObj = new XMLHttpRequest();
  14.   /* Etc... */
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement