OLD | NEW |
1 {{header}} | 1 {{header}} |
2 {{object 1 0}} << | 2 {{object 1 0}} << |
3 /Type /Catalog | 3 /Type /Catalog |
4 /Pages 2 0 R | 4 /Pages 2 0 R |
5 /AcroForm 4 0 R | 5 /AcroForm 4 0 R |
6 /OpenAction 10 0 R | 6 /OpenAction 10 0 R |
7 >> | 7 >> |
8 endobj | 8 endobj |
9 {{object 2 0}} << | 9 {{object 2 0}} << |
10 /Type /Pages | 10 /Type /Pages |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 {{object 10 0}} << | 84 {{object 10 0}} << |
85 /Type /Action | 85 /Type /Action |
86 /S /JavaScript | 86 /S /JavaScript |
87 /JS 11 0 R | 87 /JS 11 0 R |
88 >> | 88 >> |
89 endobj | 89 endobj |
90 % JS program to exexute | 90 % JS program to exexute |
91 {{object 11 0}} << | 91 {{object 11 0}} << |
92 >> | 92 >> |
93 stream | 93 stream |
94 function TestGetField() { | 94 function TestGetFieldWithDelay() { |
95 try { | 95 try { |
96 var field = this.getField("MyField"); | 96 var ff = this.getField("MyField"); |
97 app.alert("field is " + field.name); | 97 app.alert("field is " + ff.name); |
98 var sub_a = this.getField("MyField.Sub_A"); | 98 app.alert("field value is '" + ff.value + "'"); |
99 app.alert("sub_a is " + sub_a.name); | 99 ff.delay = true; |
100 var nonesuch = this.getField("MyField.nonesuch"); | 100 ff.value = "new value"; |
101 app.alert("nonesuch is " + nonesuch); | 101 this.delay=true; |
| 102 ff.delay = false; |
| 103 app.alert("field value is '" + ff.value + "'"); |
102 } catch (e) { | 104 } catch (e) { |
103 app.alert("Unexpected error: " + e); | 105 app.alert("Unexpected error: " + e); |
104 } | 106 } |
105 } | 107 } |
106 function TestGetArray() { | 108 TestGetFieldWithDelay(); |
107 try { | |
108 var subs = this.getField("MyField").getArray(); | |
109 app.alert("found " + subs.length + " sub-fields:"); | |
110 for (i = 0; i < subs.length; ++i) { | |
111 app.alert(subs[i].name); | |
112 } | |
113 } catch (e) { | |
114 app.alert("Unexpected error: " + e); | |
115 } | |
116 } | |
117 TestGetField(); | |
118 TestGetArray(); | |
119 endstream | 109 endstream |
120 endobj | 110 endobj |
121 {{xref}} | 111 {{xref}} |
122 trailer << | 112 trailer << |
123 /Root 1 0 R | 113 /Root 1 0 R |
124 >> | 114 >> |
125 {{startxref}} | 115 {{startxref}} |
126 %%EOF | 116 %%EOF |
OLD | NEW |