Please note: The estimated quote may not be accurate for homes larger than 5000 square feet. For a more precise estimate for larger homes, please contact us directly.
function getQuote() {
var cleanType = document.getElementById('cleanType').value;
var squareFootage = document.getElementById('squareFootage').value;
fetch(`https://script.google.com/macros/s/AKfycbwXnhcTsCwgkgvndTcDF_zuTRxRF29BrciQEkt03dY5mNDZaiCDs3jaKJmvG9VPIqi_/exec?cleanType=${encodeURIComponent(cleanType)}&squareFootage=${encodeURIComponent(squareFootage)}`)
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
document.getElementById('quoteResult').innerHTML = 'Estimated Quote: $' + data.price + ' +tax';
})
.catch(error => {
console.error('Error:', error);
document.getElementById('quoteResult').innerHTML = 'An error occurred. Please try again.';
});
}