scripts/database.js
/**
 * Prepare the information to be sent in an AJAX request, attempting to inserting the New Custom Route details to the Database
 * @param {String} startLocation The location the Route starts at
 * @param {String} endLocation The location the Route ends at
 * @param {String} routeType The type of route 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
 * @param {number} modelID The ID of the Model in the Database that was used to travel along the Route. Value undefined if New Custom Model was not used
 * @param {String} modelURL The URL of the Custom Model that was used
 */
Prepare the information to be sent in an AJAX request, attempting to inserting the New Custom Route details to the Database
@param {String} startLocation The location the Route starts at
@param {String} endLocation The location the Route ends at
@param {String} routeType The type of route 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
@param {number} modelID The ID of the Model in the Database that was used to travel along the Route. Value undefined if New Custom Model was not used
@param {String} modelURL The URL of the Custom Model that was used
Prepare the information to be sent in an AJAX request attempting to inserting the New Custom Route details to the Database @param { String } startLocation The location the Route starts at @param { String } endLocation The location the Route ends at @param { String } routeType The type of route 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 @param { number } modelID The ID of the Model in the Database that was used to travel along the Route . Value undefined if New Custom Model was not used @param { String } modelURL The URL of the Custom Model that was used
function addNewCustomRouteToDatabase(startLocation, endLocation, routeType, travelMethod, modelID, modelURL) {
	var newCustomRoute = new Object();
	newCustomRoute.startLocation = startLocation;
	newCustomRoute.endLocation = endLocation;
	newCustomRoute.type = routeType;
	newCustomRoute.modelID = modelID;
	newCustomRoute.methodID = travelMethod;
	newCustomRoute.modelURL = modelURL;
	var ajaxURL = "php/insertNewCustomRoute.php";
	var ajaxData = { "newCustomRoute" : newCustomRoute };
	executeAJAXRequest(ajaxURL, ajaxData, function(returnMsg){});
}
function addNewCustomRouteToDatabase ( startLocation , endLocation , routeType , travelMethod , modelID , modelURL ) { var newCustomRoute = new Object ( ) ; newCustomRoute . startLocation = startLocation ; newCustomRoute . endLocation = endLocation ; newCustomRoute . type = routeType ; newCustomRoute . modelID = modelID ; newCustomRoute . methodID = travelMethod ; newCustomRoute . modelURL = modelURL ; var ajaxURL = "php/insertNewCustomRoute.php" ; var ajaxData = { "newCustomRoute" : newCustomRoute } ; executeAJAXRequest ( ajaxURL , ajaxData , function ( returnMsg ) { } ) ; }
Prepare the information to be sent in an AJAX request, attempting to inserting the New Custom Route details to the Database
 @param {String} startLocation The location the Route starts at
 @param {String} endLocation The location the Route ends at
 @param {String} routeType The type of route that will be inserted, i.e.
Prepare the information to be sent in an AJAX request attempting to inserting the New Custom Route details to the Database @param { String } startLocation The location the Route starts at @param { String } endLocation The location the Route ends at @param { String } routeType The type of route that will be inserted i . e .