Cancel Partial Refresh via CSJS


/***
 *** Cancel Partial Refresh via CSJS
 ***
 *** Has to be embedded in CSJS-Scriptblock
 ***/

var xhrCall = null;

dojo.addOnLoad( function(){

   /*** hijack dojo's xhrRequest ***/
   dojo._xhrPost = dojo.xhrPost;
   dojo._xhrGet = dojo.xhrGet;

   dojo.xhrPost = function( args ){
      xhrCall = dojo._xhrPost( args );
   }

   dojo.xhrGet = function( args ){
      xhrCall = dojo._xhrGet( args );
   }
});

/*** Cancel Partial Refresh ***/
xhrCall.cancel()
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...