User Guide

Window functions 207
Arguments
toolbar_id, bShow
The toolbar_id argument is the ID of the toolbar, the value of the ID attribute on the
toolbar tag in the toolbars.xml file.
The bShow argument is a Boolean value that indicates whether to show or hide the toolbar. If
bshow is true, dom.setToolbarVisibility() makes the toolbar visible. If bShow is false,
dom.setToolbarVisibility() makes the toolbar invisible.
Returns
Nothing.
Example
The following example checks to see if the toolbar myEditbar is visible in the document window;
if it is not visible, it sets myEditbar to be visible:
var dom = dw.getDocumentDOM();
if(dom != null && dom.getToolbarVisibility("myEditbar") == false)
{
dom.setToolbarVisibility("myEditbar", true);
{
Window functions
Window functions handle operations that are related to the document window and the floating
panels. The window functions show and hide floating panels, determine which part of the
Document window has focus, and set the active document. For operations that are related
specifically to the Site panel, see “Site functions” on page 220.
Note: Some of the functions in this section operate only on Windows. The description of a function
indicates whether this is the case.
dom.getFocus()
Availability
Dreamweaver 3.
Description
This function determines the part of the document that is currently in focus.
Arguments
None.
Returns
One of the following strings:
The "head" string if the HEAD area is active
The "body" string if the BODY or NOFRAMES area is active
The "frameset" string if a frameset or any of its frames is selected
The "none" string if the focus is not in the document (for example, if it’s in the Property
inspector or another floating panel)
000_DW_API_Print.book Page 207 Wednesday, August 20, 2003 9:14 AM