"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Project 2
/*
function checkForNumber(fieldValue) {
var numberCheck = isNaN(fieldValue);
if (numberCheck == true) {
window.alert("You must enter a numeric value!");
return false;
}
return true;
}
function calculate()
var shipping = 0;
var total = 0; {
if (document.forms[0].hand_tool.value != document.forms[0].hand_tool.value == true)
(document.forms[0]item1.value == 20); {
&& document.forms[0].shipping.value == (shipping + 5); {
&& (document.forms[0].total.value = document.forms[0].hand_tool.value + document.forms[0].shipping.value)
}
}
function confirmSubmit() {
if (document.forms[0].first_name.value = "null") {
window.alert("You have not entered the requested Customer Information.");
return false;
}
else if (document.forms[0].last_name.value = "none" || document.forms[0].city.value = "" || document.forms[0].state.value = "none") {
window.alert("You have not entered the requested Customer Information.");
return false;
}
var pmntMethod = false
for (var j=0; j<3; ++j) {
if (document.forms[0].credit_card[j].checked == true) {
pmntMethod = true;
break;
}
}
if (pmntMethod != true) {
window.alert("You must select a method of payment.");
return false;
}
return true;
}
function confirmReset() {
var resetForm = window.confirm("Are you sure you want to reset the form?");
if (resetForm == true)
return true;
return false;
}
/* ]]> */


