Load method



Closes the current document and opens the HTML document at the specified URL.

Syntax

CommandObjectObject.Load(someURL)

Applies to

CommandObject class.

Parameters

someURL
The URL of the HTML document to be displayed.

Return value

boolean. Returns true if the HTML document is retrieved successfully, and false otherwise.

Usage

All unsaved changes to the current document are lost when Load executes.

Note: You can't create the necessary URL object reference directly in a script that will run in Internet Explorer. For example, the following script operates correctly in Netscape Navigator but not in Internet Explorer 3:

var someURL = new URL("http://myserver/mydoc.html");
var myCommandObject = document.MyWP.GetCommandObject();
var success = myCommandObject.Load(someURL);
For applications that need to run in Internet Explorer, you need to use a "helper" applet to create the necessary reference. For example:
var someURL = document.myform.URLUtil.createURL(serverbase, docname);
var myCommandObject = document.myform.MyWP.GetCommandObject();
var success = myCommandObject.Load(someURL);
See also
GetCommandObject method