Methods

The EditField HTC supports the following methods:

  • addItem

  • focus

  • reload

  • removeItem

  • resetDefault

addItem(sValue, sDisplayValue)

The addItem method is used to add a new option to a select drop-down list. This method should not be called unless the control type is set to select.

The required parameter sValue specifies the underlying value for the new item. The required parameter sDisplayValue specifies the display value for the new item.

This method has no return value.

Return to top

focus

The focus method sets focus to the EditField HTC and selects the contents, assuming the control is not disabled. When the EditField is of the select type, the drop-down button gets the focus and the box contents are not selected.

Similar behavior occurs when an EditField HTC is configured with the browsereadonly attribute set to "Yes" — the Browse button is given the focus and the box contents are not selected.

This method does not take any parameters and does not return any value.

Return to top

reload(sDataID)

The reload method is used to reload a different set of enumerated values in a select drop-down list. This method should not be called unless the control type is set to select.

The parameter sDataID specifies a field in the data-island specified by the MetaXML container attribute from which the new set of enumerated values should be retrieved.

This method has no return value.

Return to top

removeItem(sValue)

The removeItem method is used to remove an option from a select drop-down list. This method should not be called unless the control type is set to select.

The required parameter sValue specifies the underlying value for the item to remove.

This method has no return value.

Return to top

resetDefault

The resetDefault method is used to reset the control value to the default.

This method has no return value.

Return to top


All rights reserved.