[eluser]tomcode[/eluser]
Well, the base syntax is :
Code:
// Your Request
var req = new ActiveXObject('Microsoft.XMLHTTP'); // MS
var req = new XMLHttpRequest(); // Gecko & Co.
// Canceling
req.abort();
Now it really depends with which implementation You work (aka framework)
jQuery :
Code:
// Request
var req = $.ajax(options);
// Canceling
req.abort();
Mootools:
Code:
// Request
var req = new Request(options);
// Canceling
req.cancel();