I found a PDF online (at http://www.planetpdf.com/developer/article.asp?ContentID=javascript_dy namic_updates_w) that works on my iPad running PDF Expert for iPad 5.0.4.
I tried to recreate it in LiveCycle ES4 using the same code. However, the author says to place the code in the "keystroke" event. I can't find a "keystroke" event. I've tried it and variations in change, preOpen, and exit without any success.
Can someone help me?
This is the exact functionality I need and the only example that I have seen work in both a PC environment and an iPad (running PDF Expert).
Thanks!
Dan
The code can be found at: http://www.planetpdf.com/developer/article.asp?ContentID=javascript_dy namic_updates_w
The sample PDF can be found at: http://www.planetpdf.com/codecuts/pdfs/Populate.pdf
I am specifically looking at the code in the dropdown box called "Three" - which is captioned as "Dynamic"
Code follows:
==========
/* This version updates a secondary combobox based on the entry
** selected by the user dynamically. The keystroke event should
** be processed until the value is about to be committed (as
** indicated by event.willCommit). */
if (!event.willCommit) {
var f = this.getField("Four");
f.clearItems();
/* In a keystroke event, event.change contains the non-export value of the item selected by the user. */
switch (event.change) {
case "Cities":
; f.setItems(["Paris", "Berlin", "Amsterdam", "Rome"]);
break;
case "Fruit":
; f.setItems(["Bananas", "Mangos", "Strawberries", "Papayas"]);
break;
case "Garden Tools":
; f.setItems(["Hoe", "Rake", "Leaf blower", "Shovel"]);
break;
}
}