[Ajax] To abort querying server in some conditions
In some conditions, you will need to abort Ajax to query server immediately.
XMLHttpRequest object provides a function, abort(), to let you accomplish this goal.
The syntax is as following:
//myAjax is a XMLHttpRequest object
myAjax.abort();
However, you might use some 3rd party script to enhance the convenience of constructing Ajax request. For example, we used popular Prototype.js created by ( Sam Stephenson - web site: http://prototype.conio.net/) to approach it.
Prototype.js provides a method to return the XMLHttpRequest object.
var myAjax = new Ajax.Request(url, {method:'post', postBody:PostArgument , onComplete:ResponseFunctionName});
AjaxGetServerMore = myAjax.transport;
In some conditions that you define, you can use abort() method to abort querying server, such as setting time-out period.
AjaxGetServerMore.abort();
XMLHttpRequest object provides a function, abort(), to let you accomplish this goal.
The syntax is as following:
//myAjax is a XMLHttpRequest object
myAjax.abort();
However, you might use some 3rd party script to enhance the convenience of constructing Ajax request. For example, we used popular Prototype.js created by ( Sam Stephenson - web site: http://prototype.conio.net/) to approach it.
Prototype.js provides a method to return the XMLHttpRequest object.
var myAjax = new Ajax.Request(url, {method:'post', postBody:PostArgument , onComplete:ResponseFunctionName});
AjaxGetServerMore = myAjax.transport;
In some conditions that you define, you can use abort() method to abort querying server, such as setting time-out period.
AjaxGetServerMore.abort();

