User Guide
Window functions 229
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 256.
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)
NOTE
Some of the functions in this section operate only on Windows. The description of a
function indicates whether this is the case.
000_DW_API_Print.book Page 229 Wednesday, July 20, 2005 11:58 AM