Chapter 3 DynaScript Predefined Objects


Object methods

The Object object has these methods:

toString method

Syntax

Object.toString( )

Description

Returns the value of the object as a string.

Return

String.

Example

To display the value of the myObj object:

<!--SCRIPT 
myObj = new Object( "my object" );
document.WriteLn( myObj.toString() );
-->

valueOf method

Syntax

Object.valueOf( )

Description

Extracts the value of the object.

Return

Integer.

Example

To return the value of the myObj object:

<!--SCRIPT 
myObj = new Object(null);
document.WriteLn( typeof( myObj ) );
document.WriteLn( "value = " + myObj.valueOf() );
-->

 


Copyright © 1999 Sybase, Inc. All rights reserved.