function calc(form)
{
var answer = eval(form.valueA.value);
form.valueB.value = answer;
}
<P> <INPUT TYPE="button" VALUE="Calculate!!" NAME="calculate" onClick="calc(this.form)">
Just changed the function name calculate to calc and it worked
Calculte might be a keyword or someting i guess but...