Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 121507

Re: I get an error message: The value entered does not match the field format. What's wrong?

$
0
0

One can divide by a number less than zero. One cannot divide by zero or a null value which is considered zero.

 

Unless one is dividing by a non-zero constant, one needs to test for a divisor not equal to zero. Since JavaScript is an object orientated language one needs to get the field object and then test the value property of the field.

 

var nDivisor = this.getField("line_2").value;

event.value = "";

if(nDivisor != 0) event.value = this.getField("line_1").value / nDivisor;


Viewing all articles
Browse latest Browse all 121507

Trending Articles