The Book place
SEARCH
0-9
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
PARTS:
Part 90
Part 91
Part 92
Part 93
Part 94
Part 95
Part 96
Part 97
Part 98
Prev
|
Current Page 1879
|
Next
Joseph W. Lowery
"Dreamweaver CS3 Bible"
Both use the
tag to set up their available options. When you include a list box or
drop-down menu from Dreamweaver, you enter the options by clicking the List Value button and entering
the item labels and their associated values in the dialog box. The code for the Direction list box??”taken
from Matthew David??™s Marquee object??”is written as follows:
LEFT
RIGHT
UP
DOWN
Each list box or drop-down menu must have a unique name??”in the preceding code, that name is
???direction???, given in the
tag. To discover which option the user selected when working
with a drop-down menu, you examine the selected Index property of the named
object. Each
in a
tag is placed in an array in the order listed in the displayed menu. Remember,
arrays always start with a zero in JavaScript.
The following code looks at each member of the array; if that option is the one in which the
selectedIndex property is true, the proper value is assigned to a variable:
if(document.forms[0].direction.selectedIndex == 0) {
direct_choice = ???LEFT??™
} else {
if(document.
Pages:
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
An Account of the Reconquest of the Sudan (page 86)
Adonais (page 112)
An Account of the Proceedings on the Trial of Susan B. Anthony, on the Charge of Illegal Voting (page 296)