scripts/database.js
/**
 * Execute an AJAX request against a given URL
 * @param {String} url URL to a server side file to perform an AJAX request against. e.g. a PHP file
 * @param {Object} data A JSON encoded object, containing an object with properties to manipulate in the server side file
 * @callback successCB Callback function to run after AJAX request completes
 */
Execute an AJAX request against a given URL
@param {String} url URL to a server side file to perform an AJAX request against.
Execute an AJAX request against a given URL @param { String } url URL to a server side file to perform an AJAX request against .
function executeAJAXRequest(url, data, successCB) {
	$.ajax({
		type: "POST",
		url: url,
		data: data,
		success: function(returnMsg) {
			successCB(returnMsg);
		},
		error: function(jqXHR, textStatus, errorThrown) {
			successCB("null");
		}
	});
}
function executeAJAXRequest ( url , data , successCB ) { $ . ajax ( { type : "POST" , url : url , data : data , success : function ( returnMsg ) { successCB ( returnMsg ) ; } , error : function ( jqXHR , textStatus , errorThrown ) { successCB ( "null" ) ; } } ) ; }
Execute an AJAX request against a given URL
 @param {String} url URL to a server side file to perform an AJAX request against.
Execute an AJAX request against a given URL @param { String } url URL to a server side file to perform an AJAX request against .