JavaScript > JavaScript for Acrobat API Reference > JavaScript API > app > app methods > launchURL

launchURL
 
S
Launches a URL in a browser window.
Note: Beginning with Acrobat 8.1, File and JavaScript URLs can be executed only when operating in a privileged context, such as during a batch or console event. File and JavaScript URLs begin with the scheme names javascript or file.
Parameters
 
(optional) If true, this method launches the URL in a new window of the browser application. The default is false.
Returns
The value undefined is returned on success. An exception is thrown on failure.
Example 1
	app.launchURL("http://www.example.com/", true);
Example 2
Add an online help item to the menu system. This code should be placed in a folder-level JavaScript file, or executed from the JavaScript Debugger console.
	app.addMenuItem({
		cName: "myHelp", cUser: "Online myHelp", 
		cParent: "Help", 
		cExec: "app.launchURL('www.example.com/myhelp.html');", 
		nPos: 0 
	});
Related methods are openDoc and the Doc object getURL method.