Hi,
I am wondering under what conditions an ajax post request may fail.

Lets assume the server is always up. Can I then also assume that when I do the HTTP post request with jquery I will always get back the output produced by the server? In other words, does the code below always (ie. without exceptions) run either the onSucess function or the onFailure function? And if not, when can it fail to do so?

I use the following code to send a request to the server to store a player's chess move in a database:
Code:
ChessNetworkCommunicator.prototype.makeMove = function( gameId, moveNumber, originX, originY, destX, destY, promotionChoice, onSuccess, onFailure ){
	var postvars = this.QS_COMMAND + "=" + this.CMD_MAKE_MOVE +
					'&' + this.QS_GAME_ID + '=' + gameId +
				   	'&' + this.QS_MOVE_NUMBER + '=' + moveNumber +
				   	'&' + this.QS_ORIGIN_X + '=' + originX +
				   	'&' + this.QS_ORIGIN_Y + '=' + originY +
				   	'&' + this.QS_DESTINATION_X + '=' + destX +
				   	'&' + this.QS_DESTINATION_Y + '=' + destY +
					'&' + this.QS_PROMOTION_PIECE + '=' + promotionChoice ;
	
	$.post( this.URL_CHESS_SERVER, postvars, $.proxy( function( jsonServerResponse ){
		if( jsonServerResponse.meta == this.META_SUCCESSFUL ){
			onSuccess();
		} else{
			onFailure();
		}
	}, this ) );
}
Grtz. Stefan