hello all, i am having another problem with a file i am working on. acoder was great enough to help me to get it working but now when i came back to it today, its telling me that the function isn't defined. so here it is:
Code:
function getPrice()
{
var qty = parseInt(document.prodform.quantity.value, 10);
var y = document.prodform.price.value;
var num = new Number(document.prodform.price.value);
num.toFixed(2);
if (qty >= 12 && qty < 24) {
y = (qty * 3.17)
document.prodform.price.value = y;
} else if (qty >= 24 && qty < 36) {
y = qty * 2.95;
document.prodform.price.value = y;
} else if (qty >= 36 && qty < 72) {
y = qty * 2.72;
document.prodform.price.value = y;
} else if (qty >= 72 && qty < 144) {
y = qty * 2.27;
document.prodform.price.value = y;
} else if (qty >= 144 && qty < 288) {
y = qty * 1.94;
document.prodform.price.value = y;
} else if (qty >= 288 && qty < 576) {
y = qty * 1.92;
document.prodform.price.value = y;
} else if(qty >= 576 && qty < 1008){
y = qty * 1.88;
document.prodform.price.value = y;
} else if (qty >= 1008 && qty < 2016) {
y = qty * 1.85;
document.prodform.price.value = y;
} else if (qty <= 2016){
y = qty * 1.81;
document.prodform.price.value = y;
}
}
Comment