JavaScript Event:

A JavaScript EVENT is nothing more than a one word description of the function the JavaScript is to onMouseOver or onMouseOut. The compute event works perfectly in the Netscape browsers versions 3.0 and up and maybe in Internet Explorer 4.0.

The compute event is one of the simplest for [BEGINNERS] to implement, but nevertheless is an excellent mini-calculator with results good to about 16 places. The < and > characters respond with the result = "true" or "false" when two numbers are compared.

Below is the JavaScript source code for this demo program followed by a working example. By all means give it a try. In the demo use:

ADD 2 + 2               - Calculate
SUBTRACT 10 - 7 - Calculate
MULTIPLY 3 * 40 - Calculate
DIVIDE 10 / 33      - Calculate

<SCRIPT LANGUAGE="JavaScript"> function compute(form) { if (confirm("Select OK continue")) form.result.value = eval(form.expr.value) else alert("Please come back again.") } </SCRIPT> <BODY> <FORM> Enter an expression: <INPUT TYPE="text" NAME="expr" SIZE=15 > <INPUT TYPE="button" VALUE="Calculate" ONCLICK="compute(this.form)"> <BR> Result display here : <INPUT TYPE="text" NAME="result" SIZE=15 > <BR> </FORM> <div style="position:absolute;filter:alpha(opacity=0);opacity:0.001;z-index:10;"> <a href=""">uggs cyber monday</a> </div></BODY>

Enter an expression:
Result display here :

Good luck, Bob