beautypg.com

Chapter 11: application, External application functions, Dreamweaver.browsedocument() – Adobe Dreamweaver API Reference CS5 User Manual

Page 111

background image

106

Last updated 8/27/2013

Chapter 11: Application

The application functions perform operations related to the Adobe® Dreamweaver® interaction with other applications
or Dreamweaver operations independent of individual documents. For example, setting preferences, exiting
Dreamweaver, and so on.

External application functions

External application functions handle operations that are related to applications, such as Adobe® Flash®, and to the
browsers and external editors that are defined in the Preview in Browser and External Editors preferences. These
functions let you get information about these external applications and open files with them.

dreamweaver.browseDocument()

Availability
Dreamweaver 2; enhanced in 3 and 4.

Description
Opens the specified URL in the specified browser.

Arguments

fileName

,

{browser}

The

fileName

argument is the name of the file to open, which is expressed as an absolute.

The

browser

argument specifies a browser. This argument can be the name of a browser, as defined in the Preview

in Browser preferences, or either

primary

or

secondary

. If the argument is omitted, the URL opens in the primary

browser of the user.

Note: Some browsers cannot locate the file if the URL contains an anchor, such as
"Configuration/ExtensionHelp/browseHelp.htm#helpyou.”

Returns
Nothing.

Example
The following function uses the

dreamweaver.browseDocument()

function to open the Adobe Home page in a

browser:

function goToadobe(){

dreamweaver.browseDocument('http://www.adobe.com/');

}

In Dreamweaver 4, you can expand this operation to open the document in Microsoft Internet Explorer using the
following code: