ComboBox drop down on multiple pages how to break associativity
Hello All,
I am working on a script that takes a multi page pdf and adds a next page button and a combobox drop down to select an A thru Z value. I have the script almost working. Am having difficulty braking the associativity of the combobox, if I change one all the pages change.
How can I separate the comboboxes so each page has a unique value selected?
Page1 A
Page2 A
Page3 G
Page4 M
Page5 A
ect.
//populates all pages,next page arrow working, error all drop down values linked
//Create page forward on the SL: text
var inch = 72;
for (var p = 0; p < this.numPages; p++) {
// Position a rectangle (.5 inch, .5 inch)
var aRect = this.getPageBox( {nPage: p} );
aRect[0] += 3.6*inch; // from upper left hand corner of page.
aRect[2] = aRect[0]+.5*inch; // Make it .5 inch wide
aRect[1] -= 2.2*inch;
aRect[3] = aRect[1] - 24; // and 24 points high
// Now construct a button field with a right arrow from ZapfDingbats
var f = this.addField("NextPage", "button", p, aRect )
f.setAction("MouseUp", "this.pageNum++");
f.delay = true;
f.borderStyle = border.s;
f.highlight = "push";
f.textSize = 0; // Auto-sized
f.textFont = font.ZapfD
f.buttonSetCaption("\341") // A right arrow
f.delay = false;
//combo box for REV level
var name = "comborev";
var type = "combobox";
var location = [290, 602, 315, 588];
var myButton = this.addField(name, type, p, location);
myButton.editable = true;
myButton.setItems( ["A", "B", "C", "D","E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]);
myButton.textSize = 10;
myButton.editable = true;
myButton.fillColor = color.white;
}
Thanks in advance
JohnC
John Coulston