Hi everyone, I'm new here to the forum, I have a very easy problem by comparison to what I've been reading on the site...but I'm new to java for adobe, so I only have little bits and pieces to go on here..
Basically I'm trying to use 2 combo boxes to help me set the field length of a text box...here's what I have so far...but it's not working
var s = this.getField("state").value; //first combo box, list of states
var c = this.getField("company").value; //second combo box, list of companies
var y = this.getField("account"); //my account number text box.
var x; // the variable that I would use to limit my charter limit.
if (s == "NY" && c == "ABC Company")
{
x = 10;
}
else if (s == "NJ" && c == "DEF Company")
{
x = 14;
}
if (y.length != x)
{
app.alert ("Account number incorrect size");
}
I'm not entirely sure where to put this code, I've tried putting it "validation script" area of the text box...but the alert just seems to come up at random.
I'm thinking that since there are 3 solutions to any problem....maybe I'm not going about it the right way...maybe there is an easier way ????
Any ideas would be much appreciated.
Are you trying to make sure that the input a user has entered is of a certain length?
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com