I have a field that sums the total number of monthly contacts (tmc).
The optimal number of contacts is 90.
I am trying to have a script display in another box, the +/- value from the number 90.
This is what I have:
form1.BodyPage1.Load::enter - (JavaScript, client) -------------------------------------------
var tmc = (xfa.form.form1.BodyPage1.Contacts.rawValue);
var a = (tmc - 90);
if (a > 90){
this.rawValue = "+" + a ;}
else {this.rawValue = "-" + a ;}
I am getting a ( - ) sometimes when the total > 90.
I have posted the form here: http://www.filehosting.org/file/details/247961/Contacts3_1_.pdf
---- form1.BodyPage1.Load::validate - (JavaScript, client) ----------------------------------------
if (Contacts.rawValue > "90")
{
this.rawValue = "+" + (Contacts.rawValue - 90);
}
if (Contacts.rawValue < "90")
{
this.rawValue = "-" + (90 - Contacts.rawValue);
}
endif
This works except I can't get the ( + ) sign to display