scripts/database.js
/**
 * Execute an AJAX request to attempt inserting the New Custom Route details to the Database
 * @param {String} modelName The name that will be used for the Custom Model
 * @param {String} modelURL The URL of the Custom Model used
 * @param {String} modelType The type of model that will be inserted, i.e. "Builtin" or "Custom"
 * @param {number} travelMethod The ID of the Travel Method that was used to travel along the Route
 * @callback addRouteCB The driver function for adding the Route data to the Drop-Down Lists and database
 */
Execute an AJAX request to attempt inserting the New Custom Route details to the Database
@param {String} modelName The name that will be used for the Custom Model
@param {String} modelURL The URL of the Custom Model used
@param {String} modelType The type of model that will be inserted, i.e. "Builtin" or "Custom"
@param {number} travelMethod The ID of the Travel Method that was used to travel along the Route
@callback addRouteCB The driver function for adding the Route data to the Drop-Down Lists and database
Execute an AJAX request to attempt inserting the New Custom Route details to the Database @param { String } modelName The name that will be used for the Custom Model @param { String } modelURL The URL of the Custom Model used @param { String } modelType The type of model that will be inserted i . e . " Builtin " or " Custom " @param { number } travelMethod The ID of the Travel Method that was used to travel along the Route @callback addRouteCB The driver function for adding the Route data to the Drop - Down Lists and database
function addNewCustomModelToDatabase(modelName, modelURL, modelType, travelMethod, addRouteCB) {
	var newCustomModel = new Object();
	newCustomModel.name = modelName;
	newCustomModel.url = modelURL;
	newCustomModel.type = modelType;
	newCustomModel.methodID = travelMethod;
	var ajaxURL = "php/insertNewCustomModel.php";
	var ajaxData = { "newCustomModel" : newCustomModel };
	executeAJAXRequest(ajaxURL, ajaxData, addRouteCB);
}
function addNewCustomModelToDatabase ( modelName , modelURL , modelType , travelMethod , addRouteCB ) { var newCustomModel = new Object ( ) ; newCustomModel . name = modelName ; newCustomModel . url = modelURL ; newCustomModel . type = modelType ; newCustomModel . methodID = travelMethod ; var ajaxURL = "php/insertNewCustomModel.php" ; var ajaxData = { "newCustomModel" : newCustomModel } ; executeAJAXRequest ( ajaxURL , ajaxData , addRouteCB ) ; }
Execute an AJAX request to attempt inserting the New Custom Route details to the Database
 @param {String} modelName The name that will be used for the Custom Model
 @param {String} modelURL The URL of the Custom Model used
 @param {String} modelType The type of model that will be inserted, i.e.
Execute an AJAX request to attempt inserting the New Custom Route details to the Database @param { String } modelName The name that will be used for the Custom Model @param { String } modelURL The URL of the Custom Model used @param { String } modelType The type of model that will be inserted i . e .