JSObject.setMember() (Java method)

Stores a new value in a property.


JavaScript - 1.1
Netscape - 3.0
Java syntax:myJSObject.setMember("aName", "aValue")
Argument list:aNameThe name of the property to be changed
aValueThe new value to be stored in the property

This method allows the Java code to set a property of a JSObject to a new value There is a minor limitation in that you must pass a Java object and cannot set a primitive value.

The values passed to JavaScript will conform to the following conversions as they are passed to the JSObject methods:

java.lang.BooleanJavaObject object
java.lang.DoubleJavaObject object
java.lang.IntegerJavaObject object
java.lang.StringJavaObject object
netscape.javascript.JSObjectgeneric JavaScript object
all other Java objectsJavaObject object

See also:Java to JavaScript values, JSObject object, LiveConnect