Question: (HTML/JAVASCRIPT/PHP) - Please include screenshots please (Below is alread the HTML/Javascript code) ------------------------------------------------------------------------------------------------------ Problem: 1) Create text file NextSaleID.txt that contains a single line with
(HTML/JAVASCRIPT/PHP) - Please include screenshots please
(Below is alread the HTML/Javascript code)
------------------------------------------------------------------------------------------------------
Problem:
1) Create text file NextSaleID.txt that contains a single line with the following single value:
1006
(This file will be used to supply the next sale ID to a client.)
2) Create script file NextSaleID.php that:
a) Reads the value stored in file NextSaleID.txt.
b) Increments the value and writes it back to file NextSaleID.txt.
c) Returns (echoes) the unincremented value to the client.
3) Modify the Event Tickets page.
a) Run script file NextSaleID.php using a synchronous AJAX call to get the next sale ID.
b) Currently, the total price is stored in local storage. Also store the (next) sale ID and the number of tickets.
--------------------------------------------------------------------------------------------------------------------------
Event Ticket Page code here:
// Declare arrays var sections; var rows; //================================================================ // getJSONsections //================================================================ function getJSONsections() { // Attempt to get file from server try { // Create server request var xhttp = new XMLHttpRequest(); // Define callback function xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { sections = JSON.parse(this.responseText); } }; // Define command and send xhttp.open("GET", "JSONsections.txt", false); xhttp.send(); } catch (ex) { window.alert("Error" + " Name: " + ex.name + " Message: " + ex.message + " Stack: " + ex.stack); }
} //================================================================ // getJSONrows //================================================================ function getJSONrows() { // Attempt to get file from server try { // Create server request var xhttp = new XMLHttpRequest(); // Define callback function xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { rows = JSON.parse(this.responseText); } }; // Define command and send xhttp.open("GET", "JSONrows.txt", false); xhttp.send(); } catch (ex) { window.alert("Error" + " Name: " + ex.name + " Message: " + ex.message + " Stack: " + ex.stack); }
}
//================================================================ // loadComboBoxes //================================================================ function loadComboBoxes() { // Declare variables var opt; var txt;
// Loop to add sections to combo box for (var i = 0; i
// Loop to add rows to combo box for (var i = 0; i
//================================================== // openEventTicketsSummary //================================================== function openEventTicketsSummary() { // Open web page in same tab localStorage.setItem("totalPrice", tTotalPrice.value); open("CollegeFootballPlayoffs-EventTicketsSummary.html", "_self"); }
//================================================== // updatePrices //================================================== function updatePrices() { // Declare variables var price; // Test section number if (cmbSections.value
College Football Playoffs - Event Tickets
Main Event Schedule Event Tickets
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
