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

write

Generates HTML based on an expression and sends it to the client.

Server-side function

Implemented in

LiveWire 1.0

Syntax

write(expression)

Parameters

expression
A valid JavaScript expression.

Description

The write function causes server-side JavaScript to generate HTML that is sent to the client. The client interprets this generated HTML as it would static HTML. The server-side write function is similar to the client-side document.write method.

To improve performance, the JavaScript engine on the server buffers the output to be sent to the client and sends it in large blocks of at most 64 KBytes in size. You can control when data are sent to the client by using the flush function.

The write function is a top-level server-side JavaScript function that is not associated with any object. Do not confuse the write method of the File object with the write function. The write function outputs data to the client; the write method outputs data to a physical file on the server.

Examples

In the following example, the write function is passed a string, concatenated with a variable, concatenated with a BR tag:

write("The operation returned " + returnValue + "<BR>")
If returnValue is 57, this example displays the following:

The operation returned 57

See also

flush


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

Last Updated: 10/31/97 16:38:00


Copyright ?1997 Netscape Communications Corporation