Hi folks ... I know that I am going to slap myself in the forehead on this one probably, but I just can't grasp this in my mind:
Case:
In my document, there are series of fields created by place multiple fields such as:
name.first.1
name.first.2
name.last.1
name.last.2, etc...
I understand that I can assign a function to a variable such as
var getFirst=this.getField("name.first.1");
var getLast=this.getField("name.last.1");
But ... here is where I think I am just being blind ...
How would I set up a variable/function that is more flexible by letting me assign the (index number?) via a passed variable?
Can I assign the fieldname minus the index to a variable?
var fname="name.first"+indexNo;
then .... var getFirst=this.getField(fname);
I hope that I explained this in a way that makes some sense ... and that it isn't a dumb question.
Thanks in advance!
-Scott
It should be:
var fname="name.first."+indexNo;
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com