htmlTextAreaElement: Constructors for HTML form element descriptions

View source: R/htmlForm.S

htmlTextAreaElementR Documentation

Constructors for HTML form element descriptions

Description

These are functions that are used to create descriptions of an HTML form element (e.g. INPUT, TEXTAREA, SELECT) from an XMLNode object. These do not represent just a single node in the HTML document but rather the idea is that one accumulates information across different, related HTML nodes with the same name (e.g. radio buttons with <INPUT type="radio" name="bob">) in the same R object (of class HTMLFormElement). This allows us to conveniently understand an entire interface component in the HTML form from a single R object.

These functions are typically used when parsing an HTML document using getHTMLFormDescription and the multiFormElementHandlers handlers. They are not really designed for use directly as all the information is encoded in the node. We may make these more general in the future so that one can specify the different elements via separate arguments.

Usage

htmlTextAreaElement(x)
htmlSelectElement(x)
htmlInputElement(x)

Arguments

x

an XMLNode object providing information about the HTML element.

Value

An object of the basic class HTMLFormElement and some extended class. A HTMLFormElement object has the following basic elements:

name

a character string given the name attribute of the element

value

the value attribute from the XML node. This is either an attribute in the INPUT element or the text it contains (e.g in the case of an OPTION element.

defaultValue

a character vector containing the value of the default value for this HTML form element, if available. For example, if a radio button is selected or a checkbox checked, its value is stored here as an element.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

See Also

getHTMLFormDescription multiFormElementHandlers


omegahat/RHTMLForms documentation built on Nov. 29, 2023, 12:36 a.m.