India seo web development website designer freelance
How menu commands work
When the user clicks a menu with a menu item that contains a menu command, the following events occur:
- If any menuitem tag in the menu contains the dynamic attribute, calls the getDynamicContent() function in the associated Menu Commands file to populate the menu.
- calls the canAcceptCommand() function in each Menu Commands file that is referenced in the menu to check whether the command is appropriate for the selection.
- If canAcceptCommand() returns false , the menu item is dimmed.
- If canAcceptCommand() returns true or is not defined, calls the isCommandChecked() function to determine whether to display a check mark next to the menu item. If isCommandChecked() is not defined, no check mark appears.
- calls the setMenuText() function to determine the text that should appear in the menu.
If setMenuText() is not defined, uses the text that is specified in the menuitem tag.
- The user selects an item from the menu.
- calls the receiveArguments() function, if defined, in the selected Menu Commands file to let the command process any arguments that are passed from the menu item.
Note: If it is a dynamic menu item, the ID of the menu item is passed as the only argument.
- calls the commandButtons() function, if defined, to determine which buttons appear on the right side of the Options dialog box and what code should execute when the user clicks the buttons.
- scans the Menu Commands file for a FORM tag.
If a form exists, calls the windowDimensions() function to determine the size of the Options dialog box that contains the BODY elements of the file.
If windowDimensions() is not defined, automatically sizes the dialog box.
- If the Menu Commands file's BODY tag contains an onLoad handler, executes the associated code (whether or not a dialog box appears). If no dialog box appears, the remaining steps do not occur.
- The user selects options in the dialog box. executes event handlers that are associated with the fields as the user encounters them.
- The user clicks one of the buttons that are defined by commandButtons() .
- executes the code that is associated with the clicked button.
- The dialog box remains visible until one of the scripts in the Menu Commands calls window.close() .
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117