Visual InterDev

setValue Method

See Also      Applies To

Sets a value of the object.

Syntax for ListBox and OptionGroup

object.setValue(Value, [nIndex])

Syntax for fields

object.setValue(strField, Value)

Parameters

object

A script object.

Value

The value you want to set.

nIndex

Index of an item in the zero-based list. If left null, the index defaults to the currently selected item. For Listbox and OptionGroup objects, the index of the currently selected item is equivalent to the value of the selectedIndex property.

strField

The name of the field you want to set.

Remarks

For Listbox and OptionGroup objects, the method sets a text string because it corresponds to the HTML attribute VALUE.