Thank you. Can you think up with a solution to this? How can I "detect" when the call is begin terminated?
On Sep 14, 5:32 pm, MiKiTiE <mikiji...@googlemail.com> wrote: > Probably because you're sending the data to the url, but stopping the > process before it can produce a result. > > On Sep 13, 7:52 pm, "nirazue...@gmail.com" <nirazue...@gmail.com> > wrote: > > > Hi, I've noticed that when I click the Stop button on the browser, or > > navigate to another page, jQuery.ajax calls the error event. > > > You can see the problem live at:http://www.pingmyport.com/ > > > Code: > > > this.getJson = function(timeout) { > > if(this.XMLHttpRequest) this.XMLHttpRequest.abort(); > > this.XMLHttpRequest = $.ajax({ > > complete: function(){$("#kitLoader").hide();}, > > data: { > > Address: him.Address, > > portNum: him.portNum, > > portType: him.portType > > }, > > dataType: "json", > > error: him.serviceUnavailable, > > success: him.processJson, > > timeout: timeout, > > type: "POST", > > url: "http://www.pingmyport.com/checkPort.php" > > }); > > };