contenido\classes\class.htmlelements.php
Description: HTML elements
Requirements:
- Author
- Timo A. Hummel
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend classes
- Since
- file available since contenido release <= 4.6 {@internal created 2003-08-21 modified 2008-07-02, Frederic Schneider, add security fix $Id: class.htmlelements.php 469 2008-07-02 09:44:45Z frederic.schneider $: }}
- Version
- 1.6.2
\cHTML
- Parent(s)
- \HTML_Common
- Children
- \cHTMLFormElement
- \cHTMLLabel
- \cHTMLLink
- \cHTMLDiv
- \cHTMLSpan
- \cHTMLImage
- \cHTMLTable
- \cHTMLTableBody
- \cHTMLTableRow
- \cHTMLTableData
- \cHTMLTableHead
- \cHTMLTableHeader
- \cHTMLIFrame
- \cHTMLForm
- \cHTMLScript
- \cFoldingRow
- \cPage
- Author
- Timo A. Hummel
Properties

boolean $_contentlessTag- Type
- boolean
- Access
- private

array $_requiredScripts- Type
- array
- Access
- private
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : voidsets the CSS class
| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
| Name | Type | Description |
|---|---|---|
| $value | bool |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
- Deprecated
- name change, use attachStyleDefinition
\cHTMLAlignmentTable
- Parent(s)
- \cHTMLTable < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLTable::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLTable::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLTable::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLTable::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLTable::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLTable::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLTable::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLTable::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLTable::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLTable::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLTable::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLTable::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLTable::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLTable::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLTable::cHTML()
fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLTable::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLTable::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLTable::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLTable::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setCellPadding( $cellpadding) : voidsetCellPadding: Sets the padding between cells
Inherited from: \cHTMLTable::setCellPadding()| Name | Type | Description |
|---|---|---|
| $cellpadding | Padding |

setCellSpacing( $cellspacing) : voidsetCellSpacing: Sets the spacing between cells
Inherited from: \cHTMLTable::setCellSpacing()| Name | Type | Description |
|---|---|---|
| $cellspacing | Spacing |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLTable::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLTable::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setPadding( $cellpadding) : void| Name | Type | Description |
|---|---|---|
| $cellpadding |

setSpacing( $cellspacing) : void| Name | Type | Description |
|---|---|---|
| $cellspacing |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLTable::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLButton
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLButton( $name, $title = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "", $mode = "submit") : \noneConstructor.
Creates an HTML button.
Creates a submit button by default, can be changed using setMode.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $title | string Title of the button | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field | |
| $mode |
| Type | Description |
|---|---|
| \none |

cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setImageSource( $src) : voidSet the image src if mode type is "image"
| Name | Type | Description |
|---|---|---|
| $src |

setMode( $mode) : booleanSets the mode (submit or reset) for the button
| Name | Type | Description |
|---|---|---|
| $mode | string Either "submit", "reset" or "image". |
| Type | Description |
|---|---|
| boolean | Returns false if failed to set the mode |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setTitle( $title) : \noneSets the title (caption) for the button
| Name | Type | Description |
|---|---|---|
| $title | string The title to set |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLCheckbox
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Children
- \cDataCheckboxWidget
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLCheckbox( $name, $value, $id = "", $checked = false, $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML checkbox element.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $value | string Value of the radio button | |
| $id | string ID of the element | |
| $checked | boolean Is element checked? | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setChecked( $checked) : \noneSets the checked flag.
| Name | Type | Description |
|---|---|---|
| $checked | boolean If true, the "checked" attribute will be assigned. |
| Type | Description |
|---|---|
| \none |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setLabelText( $text) : \noneSets a custom label text
| Name | Type | Description |
|---|---|---|
| $text | string Text to display |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

toHtml( $renderlabel = true) : stringRenders the checkbox element.
Note:
If this element has an ID, the value (which equals the text displayed) will be rendered as seperate HTML label, if not, it will be displayed as regular text. Displaying the value can be turned off via the parameter.
| Name | Type | Description |
|---|---|---|
| $renderlabel | boolean If true, renders a label |
| Type | Description |
|---|---|
| string | Rendered HTML |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLDiv
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \NoteList
- \NoteListItem
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLDiv( $content = "") : voidConstructor.
Creates an HTML DIV element.
| Name | Type | Description |
|---|---|---|
| $content | mixed String or object with the contents |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the div's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLForm
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the form's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLFormElement
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \cHTMLHiddenField
- \cHTMLButton
- \cHTMLTextbox
- \cHTMLPasswordbox
- \cHTMLTextarea
- \cHTMLSelectElement
- \cHTMLOptionElement
- \cHTMLRadiobutton
- \cHTMLCheckbox
- \cHTMLUpload
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneConstructor.
This is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \nonesets the access key for this element.
| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \nonesets the tab index for this element.
The tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |
\cHTMLHiddenField
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLHiddenField( $name, $value = "", $id = "") : \noneConstructor.
Creates an HTML hidden field.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $value | string Title of the button | |
| $id | string ID of the element |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setValue( $value) : \noneSets the value for the field
| Name | Type | Description |
|---|---|---|
| $value | string Value of the field |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLIFrame
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \NoteView
- \cViewItems
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setBorder( $border) : voidsetBorder: Sets wether this iframe should have a border or not
| Name | Type | Description |
|---|---|---|
| $border | If 1 or true, this frame will have a border |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setHeight( $height) : voidsetHeight: Sets this frame's height
| Name | Type | Description |
|---|---|---|
| $height | Height of the item |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setWidth( $width) : voidsetWidth: Sets this frame's width
| Name | Type | Description |
|---|---|---|
| $width | Width of the item |
\cHTMLImage
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLImage( $src = NULL) : voidConstructor.
Creates an HTML IMG element.
| Name | Type | Description |
|---|---|---|
| $src |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setBorder( $border) : voidsetBorder: Sets the border size
| Name | Type | Description |
|---|---|---|
| $border | int Border size |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setHeight( $height) : voidsetHeight: Sets the image's height
| Name | Type | Description |
|---|---|---|
| $height | int Image height |

setSrc( $src) : voidsetSrc: Sets the image's source file
| Name | Type | Description |
|---|---|---|
| $src | string source location |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setWidth( $width) : voidsetWidth: Sets the image's width
| Name | Type | Description |
|---|---|---|
| $width | int Image width |
\cHTMLLabel
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLLabel( $text, $for) : \noneConstructor.
Creates an HTML label which can be linked to any form element (specified by their ID).
A label can be used to link to elements. This is very useful since if a user clicks a label, the linked form element receives the focus (if supported by the user agent).
| Name | Type | Description |
|---|---|---|
| $text | string Name of the element | |
| $for | string ID of the form element to link to. |
| Type | Description |
|---|---|
| \none |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLLink
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \NoteLink
- \TODOLink
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLLink( $href = "") : voidConstructor.
Creates an HTML link.
| Name | Type | Description |
|---|---|---|
| $href | String with the location to link to |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAnchor( $anchor) : voidsetAnchor: Sets an anchor
Only works for the link types Link and cLink.
| Name | Type | Description |
|---|---|---|
| $anchor |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setCLink( $targetarea, $targetframe, $targetaction = "") : voidsetLink: Sets a Contenido link (area, frame, action)
| Name | Type | Description |
|---|---|---|
| $targetarea | string Target backend area | |
| $targetframe | string Target frame (1-4) | |
| $targetaction | string Target action |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the link's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setCustom( $key, $value) : voidsetCustom: Sets a custom attribute to be appended to the link
| Name | Type | Description |
|---|---|---|
| $key | string Parameter name | |
| $value | string Parameter value |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setLink( $href) : voidsetLink: Sets the link to a specific location
| Name | Type | Description |
|---|---|---|
| $href | String with the location to link to |

setMultiLink( $righttoparea, $righttopaction, $rightbottomarea, $rightbottomaction) : voidsetMultiLink: Sets a multilink
| Name | Type | Description |
|---|---|---|
| $righttoparea | string Area (right top) | |
| $righttopaction | string Action (right top) | |
| $rightbottomarea | string Area (right bottom) | |
| $rightbottomaction | string Action (right bottom) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTargetFrame( $target) : voidsetTargetFrame: Sets the target frame
| Name | Type | Description |
|---|---|---|
| $target | string Target frame identifier |
\cHTMLOptionElement
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLOptionElement( $title, $value, $selected = false, $disabled = false) : \noneConstructor.
Creates an HTML option element.
| Name | Type | Description |
|---|---|---|
| $title | string Displayed title of the element | |
| $value | string Value of the option | |
| $selected | boolean If true, element is selected | |
| $disabled | boolean If true, element is disabled |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \nonesets the disabled flag
User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | boolean If true, adds the "disabled" attribute |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setSelected( $selected) : \nonesets the selected flag
| Name | Type | Description |
|---|---|---|
| $selected | boolean If true, adds the "selected" attribute |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

toHtml() : stringRenders the option element.
Note: the cHTMLSelectElement renders the options by itself.
| Type | Description |
|---|---|
| string | Rendered HTML |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLPasswordbox
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLPasswordbox( $name, $initvalue = "", $width = "", $maxlength = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML password box.
If no additional parameters are specified, the default width is 20 units.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $initvalue | string Initial value of the box | |
| $width | int width of the text box | |
| $maxlength | int maximum input length of the box | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setMaxLength( $maxlen) : \nonesets the maximum input length of the text box.
| Name | Type | Description |
|---|---|---|
| $maxlen | int maximum input length |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setValue( $value) : \nonesets the initial value of the text box.
| Name | Type | Description |
|---|---|---|
| $value | string Initial value |
| Type | Description |
|---|---|
| \none |

setWidth( $width) : \nonesets the width of the text box.
| Name | Type | Description |
|---|---|---|
| $width | int width of the text box |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLRadiobutton
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLRadiobutton( $name, $value, $id = "", $checked = false, $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML radio button element.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $value | string Value of the radio button | |
| $id | string ID of the element | |
| $checked | boolean Is element checked? | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setChecked( $checked) : \noneSets the checked flag.
| Name | Type | Description |
|---|---|---|
| $checked | boolean If true, the "checked" attribute will be assigned. |
| Type | Description |
|---|---|
| \none |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setLabelText( $text) : \noneSets a custom label text
| Name | Type | Description |
|---|---|---|
| $text | string Text to display |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

toHtml( $renderLabel = true) : stringRenders the option element.
Note:
If this element has an ID, the value (which equals the text displayed) will be rendered as seperate HTML label, if not, it will be displayed as regular text. Displaying the value can be turned off via the parameter.
| Name | Type | Description |
|---|---|---|
| $renderLabel |
| Type | Description |
|---|---|
| string | Rendered HTML |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLScript
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table head's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLSelectElement
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Children
- \cHTMLInputSelectElement
- \cDataDropdownWidget
- \cDataForeignTableDropdownWidget
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addOptionElement( $index, $element) : \noneAdds an cHTMLOptionElement to the number of choices.
| Name | Type | Description |
|---|---|---|
| $index | string Index of the element | |
| $element | object Filled cHTMLOptionElement to add |
| Type | Description |
|---|---|
| \none |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

autoFill( $stuff) : \noneAutomatically creates and fills cHTMLOptionElements
Array format: $stuff = array( array("value","title"), array("value","title"));
or regular key => value arrays.
| Name | Type | Description |
|---|---|---|
| $stuff | array Array with all items |
| Type | Description |
|---|---|
| \none |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLSelectElement( $name, $width = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML select field (aka "DropDown").
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $width | int width of the select element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDefault( $lvalue) : \noneSets a specific cHTMLOptionElement to the selected state.
| Name | Type | Description |
|---|---|---|
| $lvalue | string Specifies the "value" of the cHTMLOptionElement to set |
| Type | Description |
|---|---|
| \none |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setSelected(array $aElements) : \noneSets specified elements as selected (and all others as unselected)
| Name | Type | Description |
|---|---|---|
| $aElements | array | Array with "values" of the cHTMLOptionElement to set |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLSpan
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \cWidgetButton
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTMLSpan( $content = "") : voidConstructor.
Creates an HTML DIV element.
| Name | Type | Description |
|---|---|---|
| $content | mixed String or object with the contents |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the div's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTable
- Parent(s)
- \cHTML < \HTML_Common
- Children
- \cHTMLAlignmentTable
- \cCalendarControl
- \cDataMultiTextboxWidget
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setBorder(\border $border) : voidsetBorder: Sets the table's border
| Name | Type | Description |
|---|---|---|
| $border | \border | Border size |

setCellPadding( $cellpadding) : voidsetCellPadding: Sets the padding between cells
| Name | Type | Description |
|---|---|---|
| $cellpadding | Padding |

setCellSpacing( $cellspacing) : voidsetCellSpacing: Sets the spacing between cells
| Name | Type | Description |
|---|---|---|
| $cellspacing | Spacing |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTableBody
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table body's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTableData
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table data's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTableHead
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table head's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTableHeader
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table head's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTableRow
- Parent(s)
- \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

advanceID() : voidThis function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

fillSkeleton( $attributes) : stringfillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAlt( $alt) : voidSets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : void| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : voidsetContent: Sets the table row's content
| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setEvent( $event, $action) : voidexample: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setStyleDefinition( $entity, $definition) : string| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cHTMLTextarea
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Children
- \cDataTextareaWidget
- \cDataCodeTextareaWidget
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLTextarea( $name, $initvalue = "", $width = "", $height = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML text area.
If no additional parameters are specified, the default width is 60 chars, and the height is 5 chars.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $initvalue | string Initial value of the textarea | |
| $width | int width of the textarea | |
| $height | int height of the textarea | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setHeight( $height) : \nonesets the maximum input length of the text box.
| Name | Type | Description |
|---|---|---|
| $height |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setValue( $value) : \nonesets the initial value of the text box.
| Name | Type | Description |
|---|---|---|
| $value | string Initial value |
| Type | Description |
|---|---|
| \none |

setWidth( $width) : \nonesets the width of the text box.
| Name | Type | Description |
|---|---|---|
| $width | int width of the text box |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLTextbox
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Children
- \cDataTextWidget
- \cDatefield
- \cNominalNumberField
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLTextbox( $name, $initvalue = "", $width = "", $maxlength = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML text box.
If no additional parameters are specified, the default width is 20 units.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $initvalue | string Initial value of the box | |
| $width | int width of the text box | |
| $maxlength | int maximum input length of the box | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setMaxLength( $maxlen) : \nonesets the maximum input length of the text box.
| Name | Type | Description |
|---|---|---|
| $maxlen | int maximum input length |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setValue( $value) : \nonesets the initial value of the text box.
| Name | Type | Description |
|---|---|---|
| $value | string Initial value |
| Type | Description |
|---|---|
| \none |

setWidth( $width) : \nonesets the width of the text box.
| Name | Type | Description |
|---|---|---|
| $width | int width of the text box |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cHTMLUpload
- Parent(s)
- \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneThis is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLUpload( $name, $width = "", $maxlength = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneConstructor.
Creates an HTML upload box.
If no additional parameters are specified, the default width is 20 units.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $width | int width of the text box | |
| $maxlength | int maximum input length of the box | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

setAccessKey( $accesskey) : \none| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setMaxLength( $maxlen) : \nonesets the maximum input length of the text box.
| Name | Type | Description |
|---|---|---|
| $maxlen | int maximum input length |
| Type | Description |
|---|---|
| \none |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \noneThe tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

setWidth( $width) : \nonesets the width of the text box.
| Name | Type | Description |
|---|---|---|
| $width | int width of the text box |
| Type | Description |
|---|---|
| \none |

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |