I'm adding the total from the answer textarea and the answer2 textarea and put it into total textarea. this is what I used for that:
function calculate() {
var x = document.addem.answer.value
var y = document.addem.answer2.value
var max = document.addem.total.value
if(x>y) {
return max= x + y;
}
if(x<y) {
return max= x - y;
}
}
But nothing happens. How come?? Any ideas??
function calculate() {
var x = document.addem.answer.value
var y = document.addem.answer2.value
var max = document.addem.total.value
if(x>y) {
return max= x + y;
}
if(x<y) {
return max= x - y;
}
}
But nothing happens. How come?? Any ideas??