What should happen if the value of the field is neither blank, nor bigger than 1 (for example, 0.5)?
I didn't think about that but that but yes it would have to calculate anything that is not zero or blank.
You can use something like this:
var v = this.getField("DraftTempPost").value;
if (v=="") event.value = "";
else event.value = (Number(v)/40)-2.75;
I know i am missing some language to go along with your script (thank you btw for taking the time with this). I pasted your script and it does nothing, nor does it give me any errors.
Should there be language behind it, something like this?
than the equation?
Open the JS Console (Ctrl+J) and check for errors. What exactly happens when you change the value of the DraftTempPost field?
I have been staring at a computer for far to long and failed to see that the input "DraftTempPost" needed to be changed to "DraftTempPre" It was all operator error on my part.
thank you very much for your help.
I assume you are placing this script in the field where the result of the calculation is to appear.
event.value = (this.getField("DraftTempPost").value / 40) - 2.75;