Kaya 0.5.3 reference for HTMLDocument::addOption

List of functions and data types in HTMLDocument

ElementTree addOption(ElementTree parent, String iname, SelectOption option)

Arguments

Usage

Adds a single labelled checkbox to a form. Labelled controls are wrapped in a division, and so the parent may be the form itself.

opt = SelectOption("Confirm action","1",false);
void(addOption(form,"confirm",opt));
/*
<div><input type='checkbox' name='confirm' value='1' id='Kay1'>
  <label for='Kay1'>Confirm action</label></div>
*/

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya