Layer.load()

JavaScript 1.2+ Nav4+ Syntax

							layer.load(src, width)

Description

The load() method of the Layer object is used to load a new document in the layer. As described in the syntactical definition, this method takes the URL of the source of the layer and the width.

Example

Listing 7.333 shows how to use the load() method. When the button is clicked, the onClick event handler loads the tmp.html file.

Listing 7.333 Example of the load() Method
 <html> <head> <title> Using the load method of the Layer object</title> </head> <body> <layer id="layer1" width=200 height=200 color= bgcolor="yellow" TOP=170 LEFT=200 VISIBILITY="show"> <center>Layer 1</center> </layer> <layer id="layer2" width=150 height=160 color= bgcolor="green" TOP=100 ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.