Helma logo
helma.org » Home > Stories > HopObject.editor()

HopObject.editor()

Returns an HTML input element for a HopObject property.

Syntax
HopObject.editor(propertynameString, widthNumber, heightNumber)

The result of this function call can be used inside an HTML form. The property's value is set to the form elements value. If the optional height parameter is set, a text area is used instead of a one-line text field.

Note: Currently, the markup output does not conform to up-to-date HTML specifications (like XHTML).

Example
var editor = this.editor("title", 20);
res.write("<form>" + editor + "</form>");

<form><input type="text" name="title" size="20" value="Hello, World"></form>

var editor = this.editor("bodytext", 20, 5);
res.write("<form>" + editor + "</form>");

<form><textarea name="bodytext" cols="20" rows="5" wrap="virtual">When the going gets tough, the tough goes shopping.</textarea></form>


... comment


Page last modified on 2002-07-10 07:52 by tobi