DekGenius.com
Team LiB   Previous Section   Next Section
JSObject.call( ) invoke a method of a JavaScript object

Availability

Netscape 3, Internet Explorer 4

Synopsis

public Object call(String methodName, Object args[])

Arguments

methodName

The name of the JavaScript method to be invoked.

args[]

An array of Java objects to be passed as arguments to the method.

Returns

A Java object that represents the return value of the JavaScript method.

Description

The call( ) method of the Java JSObject class invokes a named method of the JavaScript object represented by the JSObject. Arguments are passed to the method as an array of Java objects, and the return value of the JavaScript method is returned as a Java object.

Chapter 22 describes the data conversion of the method arguments from Java objects to JavaScript values and the method return value from a JavaScript value to a Java object.

    Team LiB   Previous Section   Next Section