When I am entering a value in a text box like depth of cut, I want to be able to enter a fraction, then equals, and have it calculate the value.

For instance 1 / 8 = would change the value to 0.125.

Or, 0.125 / 3 = results in 0.042.

Basically, onkeypress, if the key is an equal, get the value, strip the equal, make sure it’s only numbers, period, and a single math operator, and then push it through eval(), then round to 3 or 4 places…