MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Dokumentacja Strona 212

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 504
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 211
212 Menus and Menu Commands
receiveArguments()
Description
Processes any arguments passed from a menu item or from the dw.runCommand() function.
If it is a dynamic menu item, it processes the dynamic menu item ID.
Arguments
{arg1}, {arg2},...{argN}
If it is a dynamic menu item, the unique ID that the getDynamicContents() function
specifies is the only argument. Otherwise, if the
arguments attribute is defined for a
menuitem tag, the value of that attribute passes to the receiveArguments() function
(and to the
canAcceptCommand(), isCommandChecked(), and setMenuText()
functions) as one or more arguments. The
arguments attribute is useful for distinguishing
between two menu items that call the same menu command.
Returns
Dreamweaver expects nothing.
Example
function receiveArguments()
{
var styleName = arguments[0];
if (styleName == "(None)")
dw.getDocumentDOM('document').applyCSSStyle('','');
else
dw.getDocumentDOM('document').applyCSSStyle('',styleName);
}
setMenuText()
Description
Specifies the text that should appear in the menu.
Arguments
{arg1}, {arg2},...{argN}
NOTE
The arguments attribute is ignored for dynamic menu items.
NOTE
Do not use this function if you are using getDynamicContent().
Przeglądanie stron 211
1 2 ... 207 208 209 210 211 212 213 214 215 216 217 ... 503 504

Komentarze do niniejszej Instrukcji

Brak uwag