Adobe 38040334 API Reference - Page 110
dreamweaver.getBrowserList
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 110 highlights
DREAMWEAVER CS3 105 API Reference Note: Some browsers cannot locate the file if the URL contains an anchor, such as "Configuration/ExtensionHelp/browseHelp.htm#helpyou". • The browser argument, which was added in Dreamweaver 3, 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 user's primary browser. Returns Nothing. Example The following function uses the dreamweaver.browseDocument() function to open the Hotwired home page in a 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 dreamweaver.getBrowserList() function, see "dreamweaver.getBrowserList()" on 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.