Forum Moderators: open
I've got a form that uses checkboxes to select products which have their values totaled up on the page. At the bottom of the form, I need to let the user choose an option that adds an additional 25% of the total order value to the order and then change the order value to reflect this. It also has to be reversible by the user should they change their mind.
I've got everything working - using Textmate's built in preview which apparently uses Safari as the rendering engine. It works just as I need.. however I get nothing from Firefox and IE adds the value, but won't let me back the value back out like in Safari.
A test case of the form can be seen here:
[mapusoft.com...]
The main parts involved with user initiated +25% is a checkbox at the bottom of the form which makes calls to this:
function support() {
var a = document.order.tax.value/100;
var b = a*document.order.total.value;
document.order.sub.value = b
if(document.getElementById('tax').checked){
var c = eval(document.order.sub.value) + eval(document.order.total.value);
document.order.total.value = c + ".00";
}
}
I'm frustrated because I thought I had it working and was quite proud of myself, even though I know it's kludgy and probably crap - but it worked and the form needs to go live in the next day - and now I'm in trouble... can anyone please help?
if(document.getElementById('tax').checked){
var c = eval(document.order.sub.value) + eval(document.order.total.value);
document.order.total.value = c + ".00";
else
}