function _fnBuildAjax( oSettings, data, fn )
		{
			// Compatibility with 1.9-, allow fnServerData and event to manipulate
			_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
		
			// Convert to object based for 1.10+ if using the old array scheme which can
			// come from server-side processing or serverParams
			if ( data && Array.isArray(data) ) {
				var tmp = {};
				var rbracket = /(.*?)\[\]$/;
		
				$.each( data, function (key, val) {
					var match = val.name.match(rbracket);
		
					if ( match ) {
						// Support for arrays
						var name = match[0];
		
						if ( ! tmp[ name ] ) {
							tmp[ name ] = [];
						}
						tmp[ name ].push( val.value );
					}
					else {
						tmp[val.name] = val.value;
					}
				} );
				data = tmp;
			}
		
			var ajaxData;
			var ajax = oSettings.ajax;
			var instance = oSettings.oInstance;
			var callback = function ( json ) {
				var status = oSettings.jqXhr
					? oSettings.jqXhr.status
					: null;
		
				if ( json === null || (typeof status === 'number' && status == 204 ) ) {
					json = {};
					_fnAjaxDataSrc( oSettings, json, [] );
				}
		
				var error = json.error || json.sError;
				if ( error ) {
					_fnLog( oSettings, 0, error );
				}
		
				oSettings.json = json;
		
				_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
				fn( json );
			};
		
			if ( $.isPlainObject( ajax ) && ajax.data )
			{
				ajaxData = ajax.data;
		
				var newData = typeof ajaxData === 'function' ?
					ajaxData( data, oSettings ) :  // fn can manipulate data or return
					ajaxData;                      // an object object or array to merge
		
				// If the function returned something, use that alone
				data = typeof ajaxData === 'function' && newData ?
					newData :
					$.extend( true, data, newData );
		
				// Remove the data property as we've resolved it already and don't want
				// jQuery to do it again (it is restored at the end of the function)
				delete ajax.data;
			}
		
			var baseAjax = {
				"data": data,
				"success": callback,
				"dataType": "json",
				"cache": false,
				"type": oSettings.sServerMethod,
				"error": function (xhr, error, thrown) {
					var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
		
					if ( $.inArray( true, ret ) === -1 ) {
						if ( error == "parsererror" ) {
							_fnLog( oSettings, 0, 'Invalid JSON response', 1 );
						}
						else if ( xhr.readyState === 4 ) {
							_fnLog( oSettings, 0, 'Ajax error', 7 );
						}
					}
		
					_fnProcessingDisplay( oSettings, false );
				}
			};
		
			// Store the data submitted for the API
			oSettings.oAjaxData = data;
		
			// Allow plug-ins and external processes to modify the data
			_fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
		
			if ( oSettings.fnServerData )
			{
				// DataTables 1.9- compatibility
				oSettings.fnServerData.call( instance,
					oSettings.sAjaxSource,
					$.map( data, function (val, key) { // Need to convert back to 1.9 trad format
						return { name: key, value: val };
					} ),
					callback,
					oSettings
				);
			}
			else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
			{
				// DataTables 1.9- compatibility
				oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
					url: ajax || oSettings.sAjaxSource
				} ) );
			}
			else if ( typeof ajax === 'function' )
			{
				// Is a function - let the caller define what needs to be done
				oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
			}
			else
			{
				// Object to extend the base settings
				oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
		
				// Restore for next time around
				ajax.data = ajaxData;
			}
		}
/**
		 * Create an Ajax call based on the table's settings, taking into account that
		 * parameters can have multiple forms, and backwards compatibility.
		 *
		 * @param {object} oSettings dataTables settings object
		 * @param {array} data Data to send to the server, required by
		 *     DataTables - may be augmented by developer callbacks
		 * @param {function} fn Callback function to run when data is obtained
		 */
Create an Ajax call based on the table's settings, taking into account that
parameters can have multiple forms, and backwards compatibility.

@param {object} oSettings dataTables settings object
@param {array} data Data to send to the server, required by
DataTables - may be augmented by developer callbacks
@param {function} fn Callback function to run when data is obtained
Create an Ajax call based on the table ' s settings taking into account that parameters can have multiple forms and backwards compatibility . @param { object } oSettings dataTables settings object @param { array } data Data to send to the server required by DataTables - may be augmented by developer callbacks @param { function } fn Callback function to run when data is obtained
function _fnBuildAjax( oSettings, data, fn )
		{
			_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
			if ( data && Array.isArray(data) ) {
				var tmp = {};
				var rbracket = /(.*?)\[\]$/;
				$.each( data, function (key, val) {
					var match = val.name.match(rbracket);
					if ( match ) {
						var name = match[0];
						if ( ! tmp[ name ] ) {
							tmp[ name ] = [];
						}
						tmp[ name ].push( val.value );
					}
					else {
						tmp[val.name] = val.value;
					}
				} );
				data = tmp;
			}
			var ajaxData;
			var ajax = oSettings.ajax;
			var instance = oSettings.oInstance;
			var callback = function ( json ) {
				var status = oSettings.jqXhr
					? oSettings.jqXhr.status
					: null;
				if ( json === null || (typeof status === 'number' && status == 204 ) ) {
					json = {};
					_fnAjaxDataSrc( oSettings, json, [] );
				}
				var error = json.error || json.sError;
				if ( error ) {
					_fnLog( oSettings, 0, error );
				}
				oSettings.json = json;
				_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
				fn( json );
			};
			if ( $.isPlainObject( ajax ) && ajax.data )
			{
				ajaxData = ajax.data;
				var newData = typeof ajaxData === 'function' ?
					ajaxData( data, oSettings ) :  
					ajaxData;                      
				data = typeof ajaxData === 'function' && newData ?
					newData :
					$.extend( true, data, newData );
				delete ajax.data;
			}
			var baseAjax = {
				"data": data,
				"success": callback,
				"dataType": "json",
				"cache": false,
				"type": oSettings.sServerMethod,
				"error": function (xhr, error, thrown) {
					var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
					if ( $.inArray( true, ret ) === -1 ) {
						if ( error == "parsererror" ) {
							_fnLog( oSettings, 0, 'Invalid JSON response', 1 );
						}
						else if ( xhr.readyState === 4 ) {
							_fnLog( oSettings, 0, 'Ajax error', 7 );
						}
					}
					_fnProcessingDisplay( oSettings, false );
				}
			};
			oSettings.oAjaxData = data;
			_fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
			if ( oSettings.fnServerData )
			{
				oSettings.fnServerData.call( instance,
					oSettings.sAjaxSource,
					$.map( data, function (val, key) { 
						return { name: key, value: val };
					} ),
					callback,
					oSettings
				);
			}
			else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
			{
				oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
					url: ajax || oSettings.sAjaxSource
				} ) );
			}
			else if ( typeof ajax === 'function' )
			{
				oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
			}
			else
			{
				oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
				ajax.data = ajaxData;
			}
		}
function _fnBuildAjax ( oSettings , data , fn ) { _fnCallbackFire ( oSettings , 'aoServerParams' , 'serverParams' , [ data ] ) ; if ( data && Array . isArray ( data ) ) { var tmp = { } ; var rbracket = / (.*?)\[\]$ / ; $ . each ( data , function ( key , val ) { var match = val . name . match ( rbracket ) ; if ( match ) { var name = match [ 0 ] ; if ( ! tmp [ name ] ) { tmp [ name ] = [ ] ; } tmp [ name ] . push ( val . value ) ; } else { tmp [ val . name ] = val . value ; } } ) ; data = tmp ; } var ajaxData ; var ajax = oSettings . ajax ; var instance = oSettings . oInstance ; var callback = function ( json ) { var status = oSettings . jqXhr ? oSettings . jqXhr . status : null ; if ( json === null || ( typeof status === 'number' && status == 204 ) ) { json = { } ; _fnAjaxDataSrc ( oSettings , json , [ ] ) ; } var error = json . error || json . sError ; if ( error ) { _fnLog ( oSettings , 0 , error ) ; } oSettings . json = json ; _fnCallbackFire ( oSettings , null , 'xhr' , [ oSettings , json , oSettings . jqXHR ] ) ; fn ( json ) ; } ; if ( $ . isPlainObject ( ajax ) && ajax . data ) { ajaxData = ajax . data ; var newData = typeof ajaxData === 'function' ? ajaxData ( data , oSettings ) : ajaxData ; data = typeof ajaxData === 'function' && newData ? newData : $ . extend ( true , data , newData ) ; delete ajax . data ; } var baseAjax = { "data" : data , "success" : callback , "dataType" : "json" , "cache" : false , "type" : oSettings . sServerMethod , "error" : function ( xhr , error , thrown ) { var ret = _fnCallbackFire ( oSettings , null , 'xhr' , [ oSettings , null , oSettings . jqXHR ] ) ; if ( $ . inArray ( true , ret ) === - 1 ) { if ( error == "parsererror" ) { _fnLog ( oSettings , 0 , 'Invalid JSON response' , 1 ) ; } else if ( xhr . readyState === 4 ) { _fnLog ( oSettings , 0 , 'Ajax error' , 7 ) ; } } _fnProcessingDisplay ( oSettings , false ) ; } } ; oSettings . oAjaxData = data ; _fnCallbackFire ( oSettings , null , 'preXhr' , [ oSettings , data ] ) ; if ( oSettings . fnServerData ) { oSettings . fnServerData . call ( instance , oSettings . sAjaxSource , $ . map ( data , function ( val , key ) { return { name : key , value : val } ; } ) , callback , oSettings ) ; } else if ( oSettings . sAjaxSource || typeof ajax === 'string' ) { oSettings . jqXHR = $ . ajax ( $ . extend ( baseAjax , { url : ajax || oSettings . sAjaxSource } ) ) ; } else if ( typeof ajax === 'function' ) { oSettings . jqXHR = ajax . call ( instance , data , callback , oSettings ) ; } else { oSettings . jqXHR = $ . ajax ( $ . extend ( baseAjax , ajax ) ) ; ajax . data = ajaxData ; } }
Create an Ajax call based on the table's settings, taking into account that
 parameters can have multiple forms, and backwards compatibility.
Create an Ajax call based on the table ' s settings taking into account that parameters can have multiple forms and backwards compatibility .
// Compatibility with 1.9-, allow fnServerData and event to manipulate // Convert to object based for 1.10+ if using the old array scheme which can // come from server-side processing or serverParams // Support for arrays // fn can manipulate data or return // an object object or array to merge // If the function returned something, use that alone // Remove the data property as we've resolved it already and don't want // jQuery to do it again (it is restored at the end of the function) // Store the data submitted for the API // Allow plug-ins and external processes to modify the data // DataTables 1.9- compatibility // Need to convert back to 1.9 trad format // DataTables 1.9- compatibility // Is a function - let the caller define what needs to be done // Object to extend the base settings // Restore for next time around