MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 242

Extending dreamweaver
Table of Contents

Advertisement

getMenuID()
Availability
Dreamweaver MX.
Description
Only valid for menu buttons. Dreamweaver calls the
the menu that should appear when the user clicks the button.
Arguments
None.
Returns
Dreamweaver expects a string that contains a menu ID, which is defined in the menus.xml
file.
Example
function getMenuID()
{
var dom = dw.getDocumentDOM();
var menuID = '';
if (dom)
{
var view = dom.getView();
var focus = dw.getFocus();
if (view == 'design')
{
menuID = 'DWDesignOnlyOptionsPopup';
}
else if (view == 'split')
{
if (focus == 'textView')
{
menuID = 'DWSplitCodeOptionsPopup';
}
else
{
menuID = 'DWSplitDesignOptionsPopup';
}
}
else if (view == 'code')
{
menuID = 'DWCodeOnlyOptionsPopup';
}
else
{
242
Toolbars
function to get the ID of
getMenuID()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver 8

Table of Contents