Monthly Archives: December 2022

bad credit loans urban bcl

Welcome to WordPress. This is your first post. Edit or delete it, then start writing

QR Code Generator


iframe Generator







Length:
Width:
Depth:
Unit:
Email:
function calculateSoilNeeded() { // Get the form input values var length = document.forms[0]["length"].value; var width = document.forms[0]["width"].value; var depth = document.forms[0]["depth"].value; var unit = document.forms[0]["unit"].value; var email = document.forms[0]["email"].value; // Validate the email address if (!email || !email.includes("@")) { alert("Please enter a valid email address."); return; } // Calculate the soil needed var soilNeeded = length * width * depth; // Send an AJAX request to the PHP script var xhr = new XMLHttpRequest(); xhr.open('POST', 'send-email.php'); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onload = function() { if (xhr.status === 200) { alert('Email sent successfully!'); } else { alert('An error occurred while sending the email.'); } }; xhr.send(`length=${length}&width=${width}&depth=${depth}&unit=${unit}&email=${email}&soilNeeded=${soilNeeded}`); }