[Contents] [Previous] [Next] [Index]

import

Allows a script to import properties, functions, and objects from a signed script which has exported the information.

Implemented in

Navigator 4.0, Netscape Server 3.0

Syntax

import objectName.name1, objectName.name2, ..., objectName.nameN
import objectName.*

Parameters

nameN
List of properties, functions, and objects to import from the export file.

objectName
Name of the object that will receive the imported names.

*
imports all properties, functions, and objects from the export script.

Description

The objectName parameter is the name of the object that will receive the imported names. For example, if f and p have been exported, and if obj is an object from the importing script, then

import obj.f, obj.p 
makes f and p accessible in the importing script as properties of obj.

Typically, information in a signed script is available only to scripts signed by the same principals. By exporting (using the export statement) properties, functions, or objects, a signed script makes this information available to any script (signed or unsigned). The receiving script uses the import statement to access the information.

The script must load the export script into a window, frame, or layer before it can import and use any exported properties, functions, and objects.

See also

export


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 12:29:59


Copyright © 1997 Netscape Communications Corporation