Hi,
I have a piece of javascript that works very nice in IE but doesn't work in a Firefox browser..
function Check_Prod()
{
theForm = document.order_form;
var total = 0;
for ( i = 1 ; i <= nr_of_prod ; i++ ) {
if(theForm.elements['Product' + i].checked == true) {
tmp_pric = 0;
theForm.elements['price'+ i].value = theForm.elements['price_hid' + i ].value;
tmp_pric = new Number(theForm.elements['price_hid' + i ].value);
total = total + tmp_pric;
} else {
theForm.elements['price'+ i].value = "";
}
}
total = total.toFixed(2);
if (total == 0 ){
theForm.elements['Price_tot'].value = "";
} else {
theForm.elements['Price_tot'].value = total;
}
}
Thanx,
Lon
I have a piece of javascript that works very nice in IE but doesn't work in a Firefox browser..
function Check_Prod()
{
theForm = document.order_form;
var total = 0;
for ( i = 1 ; i <= nr_of_prod ; i++ ) {
if(theForm.elements['Product' + i].checked == true) {
tmp_pric = 0;
theForm.elements['price'+ i].value = theForm.elements['price_hid' + i ].value;
tmp_pric = new Number(theForm.elements['price_hid' + i ].value);
total = total + tmp_pric;
} else {
theForm.elements['price'+ i].value = "";
}
}
total = total.toFixed(2);
if (total == 0 ){
theForm.elements['Price_tot'].value = "";
} else {
theForm.elements['Price_tot'].value = total;
}
}
Thanx,
Lon