Instant Quote Generator
How do I make an instant quote generator?
What is a instant quote generator? How do you make a instant quote generator? This script and codes were developed by Amy Kapernick on 24 August 2022, Wednesday.
Instant Quote Generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Instant Quote Generator</title> <script src="https://use.typekit.net/ady8plm.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form action="http://aimhigherwebdesign.com"> <label><input type="checkbox" name="host-weeb" value="domainReg" /> Website</label></br> <label><input type="checkbox" name="dom-zuv" value="hosting"/> I already have a Domain name (eg. www.yourbusinessname.com.au)</label></br> <label><input type="checkbox" name="cont" value="content"/> Content Writing and Editing</label></br> <label><input type="checkbox" name="tech-10" value="tech10"/> Website Maintenance (Infrequent updates)</label></br> <label><input type="checkbox" name="tech-20" value="contact"/> Website Maintenance (Frequent updates)</label></br> <label><input type="checkbox" name="gsuite" value="email" /> Email Hosting (eg. [email protected])</label></br> <label><input type="checkbox" name="office365" /> Shared Mailbox</label></br> <label><input type="checkbox" name="office-suite" value="office365" /> Microsoft Office Suite</label></br> <label><input type="checkbox" name="onedrive" value="onedrive" /> 1TB Online Storage</label></br> <label><input type="checkbox" name="online-store" value="contact" /> Online Store</label></br> <label>How many pages would you like? <select name="number-pages"> <option value="5" selected>1-3</option> <option value="8">4-7</option> <option value="10">8-11</option> <option value="contact">12+</option> </select></label></br> <input type="button" id="calculate" value="Generate Quote"></input>
</form>
<div id="display-here"> <p id="upfront-costs"></p> <p id="ongoing-costs"></p>
</div> <script src="js/index.js"></script>
</body>
</html>
Instant Quote Generator - Script Codes CSS Codes
html { font-family: tk-tondo, sans-serif; font-weight: normal; display: inline; font-size: 1rem;
}
input { padding: 10px;
}
option {
}
Instant Quote Generator - Script Codes JS Codes
//Variables
var domainReg = 22.44;
var hosting = 12;
var hourRate = 30;
var content = 100;
var tech01 = 15;
var tech10 = 50;
var email = 6;
var office365 = 20;
var onedrive = 10;
var services = document.forms[0];
var upfrontCost = 0;
var monthlyCost = 0;
//Testing
// console.log(serviceOfferings[1].checked);
//Run calculate
var clickButton = function() { document.getElementById('calculate').addEventListener('click', calculate);
};
//Calculation
var calculate = function() { // console.log("calculating");
//Upfront costs //Website if(services[0].checked) { upfrontCost += 200; }; //Domain if(services[1].checked) { upfrontCost -= domainReg; }; //Content if(services[2].checked) { upfrontCost += content; };
//Monthly costs //Support and Management //Management if(services[3].checked) { upfrontCost += tech10 * 2; monthlyCost += tech10; } //Full-blown management else if (services[4].checked) { alert('Unfortunately we are unable to generate an instant quote for your required services at this time. Please submit an inquiry and we will get back to you with a customised quote soon.'); } //Basic Tech Support else { upfrontCost += tech01 * 2; monthlyCost += tech01; }; //Email Hosting, gsuite or office365 if(services[5].checked) { upfrontCost += email * 2; monthlyCost += email; }; //Shared Mailbox if(services[6].checked) { if(services[5].checked) { upfrontCost -= email * 2; monthlyCost -= email; }; totalCost += email * 2; monthlyCost += email; }; //Full Office Suite if(services[7].checked) { if(services[5].checked || services[6].checked) { upfrontCost -= email * 2; monthlyCost -= email; }; upfrontCost += office365 * 2; monthlyCost += office365; }; //OneDrive Storage if(services[8].checked) { if(services[5].checked || services[6].checked) { upfrontCost -= email * 2; monthlyCost -= email; }; if(services[7].checked) { upfrontCost -= onedrive * 2; monthlyCost -= onedrive; }; upfrontCost += onedrive * 2; monthlyCost += onedrive; }; //Online Store if(services[9].checked) { alert('Unfortunately we are unable to generate an instant quote for your required services at this time. Please submit an inquiry and we will get back to you with a customised quote soon.'); }; // console.log('The total upfront costs will be $' + upfrontCost + ' (This includes the first 2 months of ongoing costs)'); // console.log('and ongoing costs of $' + monthlyCost + ' per month'); generate(upfrontCost, monthlyCost); upfrontCost = 0; monthlyCost = 0;
}
//Display
var generate = function(upfrontCost, monthlyCost) { console.log('generate running'); var upfront = 'The total upfront costs will be $' + upfrontCost + ' (This includes the first 2 months of ongoing costs)'; // console.log(upfront); var monthly = 'with ongoing costs of $' + monthlyCost + ' per month after that'; // console.log(monthly); document.getElementById('upfront-costs').innerHTML = upfront; document.getElementById('ongoing-costs').innerHTML = monthly;
};
//Run functions
clickButton();
Developer | Amy Kapernick |
Username | aimhigherwebdesign-amy |
Uploaded | August 24, 2022 |
Rating | 3 |
Size | 3,063 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Nutrition Calculator | 2,468 Kb |
Portfolio Page | 2,956 Kb |
AV Venues Page | 10,901 Kb |
Email Signature | 2,726 Kb |
Battle Against the Dragon | 4,524 Kb |
Gulpfile | 1,765 Kb |
Search box with SVG icon | 2,868 Kb |
Triangles | 2,371 Kb |
WebEx Troubleshooting | 12,011 Kb |
Playing with Flexbox | 2,941 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Process Accordion | Devilskitchen | 31,432 Kb |
Obligatory CSS3 UI Nav | Romandiaz | 9,017 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
Foundation 5 Menu - Accessibility | Xporter | 1,999 Kb |
Animated Logo | Shakdaniel | 2,672 Kb |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
A Pen by Sooba | Sooba | 2,516 Kb |
Animated Slide Hamburger Mobile Menu | BJack | 2,247 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Scroll to top button | DominicFrancois | 3,743 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!