Adobe 38040334 - Dreamweaver CS3 User Manual page 110

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Note: Some browsers cannot locate the file if the URL contains an anchor, such as "Configuration/Exten-
sionHelp/browseHelp.htm#helpyou".
• The
argument, which was added in Dreamweaver 3, specifies a browser. This argument can be the name
browser
of a browser, as defined in the Preview in Browser preferences or either
argument is omitted, the URL opens in the user's primary browser.
Returns
Nothing.
Example
The following function uses the
browser:
function goToHotwired(){
dreamweaver.browseDocument('http://www.hotwired.com/');
}
In Dreamweaver 4, you can expand this operation to open the document in Microsoft Internet Explorer using the
following code:
function goToHotwired(){
var prevBrowsers = dw.getBrowserList();
var theBrowser = "";
for (var i=1; i < prevBrowsers.length; i+2){
if (prevBrowsers[i].indexOf('Iexplore.exe') != -1){
theBrowser = prevBrowsers[i];
break;
}
}
dw.browseDocument('http://www.hotwired.com/',theBrowser);
}
For more information on the
page 105.
dreamweaver.getBrowserList()
Availability
Dreamweaver 3.
Description
Gets a list of all the browsers in the File > Preview in Browser submenu.
Arguments
None.
Returns
An array that contains a pair of strings for each browser in the list. The first string in each pair is the name of the
browser, and the second string is its location on the user's computer, which is expressed as a file:// URL. If no
browsers appear in the submenu, the function returns nothing.
dreamweaver.browseDocument()
dreamweaver.getBrowserList()
or
'primary'
'secondary'
function to open the Hotwired home page in a
function, see "dreamweaver.getBrowserList()" on
DREAMWEAVER CS3
105
API Reference
. If the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents