window.onload = function() { // Create a popup window to enter an email let email = prompt("Please enter your email to Request Price:"); // If email is not null or empty, send it to the server if (email !== null && email !== "") { // Use AJAX to send the email to the server var xhr = new XMLHttpRequest(); xhr.open("POST", "", true); // Posting to the current page xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { // Optional: You can handle the response here console.log("Email saved to session successfully."); } }; xhr.send("email=" + encodeURIComponent(email)); } else { alert("Email is required."); } }; f="../css/style.css" rel="stylesheet" />
Your Requested Price Items Displayed Below for Quick Access
Item Code | Discription | Quentity | Remove |
---|