File: fde0016.tex

package info (click to toggle)
texlive-doc 2009-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 192,004 kB
  • ctags: 4,774
  • sloc: perl: 12,760; xml: 11,870; makefile: 1,033; lisp: 394; sh: 229; awk: 205; java: 159; sed: 4
file content (27 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The choice lists can be initialized using JavaScript instead
of writing the choices in the \textit{\textbackslash{}ChoiceMenu[]\{\}\{\}}
macro.\\
This provides a better overview.

Choices are specified in an array. Each array element is an array again,
consisting of two entries: the full text shown on screen and an
abbreviation:
\begin{lstlisting}
var softwareAuswahl = [
  [ "", ""],
  [ "Betriebssystem", "os" ],
  [ "Textverarbeitung", "tp" ],
  [ "Tabellenkalkulation", "sc" ],
  [ "Prsentationsprogramm", "pp" ],
  [ "E-Mail-Client", "mc" ],
  [ "Web browser", "wb" ],
  [ "Mathematik-Software", "ms" ],
  [ "PDF-Anzeigeprogramm", "pv" ]
];
\end{lstlisting}
The \textit{setItems()\/} method sets the choices for
a choice list:
\begin{lstlisting}
this.getField("sw01").setItems(softwareAuswahl);
\end{lstlisting}
\lstinputlisting{../examples/ex0101.tex}