Hi, I've had to make a simple script to do simple calculations:

Code:
<script language=JavaScript>
function calculate()
{
document.calculator.answer.value=
eval(document.calculator.expression.value)
}
</script>

<form name="calculator">
<input type="text" size="20" name="expression">
<input type="button" value="Calculate" onclick="calculate()">
<input type="reset" value="Reset">
Answer:<input type="text" size="20" name="answer">
</form>
But, what I now want to do is validate it, so that if any letters of the alphabet are entered > then an alert comes up. So basically, all I want allowed is: numbers + - * / . ( )

I've tried to figure this out and searched everywhere on the net, but haven't found much! So is there a simple solution to this?

Thanks.