Answered
Here is the code for my menu button:
var aFruits = ["Fruits",["Apples","Macintosh","Red_Delicious","Green"],["Oranges","navel","valencia"],["Berries","Huckle","Goose"]]; var aVeggies = ["Vegetables",["Beans","Kidney","Black_eyed"],["Corn","Sweet","Stock"]]; // Create an array to hold the top level menu entries var aTopItems = [aFruits, aVeggies, aArmor]; var cRtn = app.popUpMenu.apply(app,aTopItems); console.show(); console.clear(); console.println("You selected: " + cRtn); if(cRtn != null) this.getField("Text4").value = cRtn;
For testing I've made the following array:
var oProduct = { Macintosh: [3,"Fruit","1lbs."], Red_Delishious: [7,"Sweet","1/2lbs."], };
The button will put Macintosh in field "Text4" and works great. For the example, I then have fields "Text5", "Text6", and "Text7" that I'm trying to display 3, Fruit, and 1lbs respectively once Macintosh becomes the active value. Is there a clean and simple way to do this?
Thanks in advance for any help that can be offered,
Jim
For example:
There are tutorials and examples that show different methods for doing exactly this kind of thing at www.pdfscripting.com
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script