Hey there,
You need to prevent the Button's PostBack after it has calculated and set the answer, do this:
Replace your Submit button with this:
<input type="submit" value="Submit" önclick="return calculate();" />
and add a return false at the end of
calculate()
function:
function calculate() {
var x = eval(document.getElementById("txt_area").value);
document.getElementById("txt_area").value = x;
return false;
}
Let me know if it helps.
Azee...