Stefanie
01-25-2012, 04:36 AM
I will start off by saying yes this is homework but I only want help. I'm trying to make the content show up in the read only boxes but I can't figure out where I'm going wrong. My test page can be found at http://sidewalk-cafe.com/test/maddox-hw2a.html. It's small. Any help would be appreciated.
function orderForm() {
var formDaysStaying = document.getElementById("daysStaying").value;
var formSeason = document.getElementById("season").value;
var formPropertyType = document.getElementById("propertyType").value;
document.getElementById("FEE").value = "$" + today.toFixed(2);
document.getElementById("totalCost").value = "$" + today.toFixed(2);
document.getElementById("today").value = "$" + today.toFixed(2);
document.getElementById("due").value = "$" + due.toFixed(2);
}
function formTotalCost(form) {
const FEE = 55;
var totalCost = (formPropertyType * formSeason) * formDaysStaying;
var today = totalCost * .10;
var due = (totalCost + FEE) - today;
if (document.getElementById("daysStaying").value == "" ||
isNaN(document.getElementById("daysStaying").value))
alert("Please provide the number of days you will be staying.");
// Submit the order to the server
form.submit();
}
function orderForm() {
var formDaysStaying = document.getElementById("daysStaying").value;
var formSeason = document.getElementById("season").value;
var formPropertyType = document.getElementById("propertyType").value;
document.getElementById("FEE").value = "$" + today.toFixed(2);
document.getElementById("totalCost").value = "$" + today.toFixed(2);
document.getElementById("today").value = "$" + today.toFixed(2);
document.getElementById("due").value = "$" + due.toFixed(2);
}
function formTotalCost(form) {
const FEE = 55;
var totalCost = (formPropertyType * formSeason) * formDaysStaying;
var today = totalCost * .10;
var due = (totalCost + FEE) - today;
if (document.getElementById("daysStaying").value == "" ||
isNaN(document.getElementById("daysStaying").value))
alert("Please provide the number of days you will be staying.");
// Submit the order to the server
form.submit();
}