HTML Textbox
| author | Timo A. Hummel |
|---|
__toString() : string
| inherited_from | \cHTML::__toString() |
|---|---|
| inherited_from | \cHTMLFormElement::__toString() |
| inherited_from | \cHTMLTextbox::__toString() |
| inherited_from | \cDatefield::__toString() |
| inherited_from | \cDateChooser::__toString() |
stringGenerated markup_setContent($content)
| inherited_from | \cHTML::_setContent() |
|---|---|
| inherited_from | \cHTMLFormElement::_setContent() |
| inherited_from | \cHTMLTextbox::_setContent() |
| inherited_from | \cDatefield::_setContent() |
| inherited_from | \cDateChooser::_setContent() |
string/object String with the content or an object to render.
addRequiredScript($script)
| inherited_from | \cHTML::addRequiredScript() |
|---|---|
| inherited_from | \cHTMLFormElement::addRequiredScript() |
| inherited_from | \cHTMLTextbox::addRequiredScript() |
| inherited_from | \cDatefield::addRequiredScript() |
| inherited_from | \cDateChooser::addRequiredScript() |
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.
| inherited_from | \cHTML::advanceID() |
|---|---|
| inherited_from | \cHTMLFormElement::advanceID() |
| inherited_from | \cHTMLTextbox::advanceID() |
| inherited_from | \cDatefield::advanceID() |
| inherited_from | \cDateChooser::advanceID() |
attachEventDefinition($sName, $sEvent, $sCode)
Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| inherited_from | \cHTML::attachEventDefinition() |
|---|---|
| inherited_from | \cHTMLFormElement::attachEventDefinition() |
| inherited_from | \cHTMLTextbox::attachEventDefinition() |
| inherited_from | \cDatefield::attachEventDefinition() |
| inherited_from | \cDateChooser::attachEventDefinition() |
string defines the name of the event
string defines the event (e.g. onClick)
string defines the code
attachStyleDefinition($sName, $sDefinition) : string
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;"
| inherited_from | \cHTML::attachStyleDefinition() |
|---|---|
| inherited_from | \cHTMLFormElement::attachStyleDefinition() |
| inherited_from | \cHTMLTextbox::attachStyleDefinition() |
| inherited_from | \cDatefield::attachStyleDefinition() |
| inherited_from | \cDateChooser::attachStyleDefinition() |
string Name for a style definition
string Definition for the given entity
stringfilled SGML closing skeletoncDateChooser($name, $initValue)
| inherited_from | \cDateChooser::cDateChooser() |
|---|
cDatefield($name, $initvalue, $width)
| inherited_from | \cDatefield::cDatefield() |
|---|---|
| inherited_from | \cDateChooser::cDatefield() |
cHTML()
| inherited_from | \cHTML::cHTML() |
|---|---|
| inherited_from | \cHTMLFormElement::cHTML() |
| inherited_from | \cHTMLTextbox::cHTML() |
| inherited_from | \cDatefield::cHTML() |
| inherited_from | \cDateChooser::cHTML() |
cHTMLFormElement($name, $id, $disabled, $tabindex, $accesskey) : \none
This is a generic form element, where specific elements should be inherited from this class.
| inherited_from | \cHTMLFormElement::cHTMLFormElement() |
|---|---|
| inherited_from | \cHTMLTextbox::cHTMLFormElement() |
| inherited_from | \cDatefield::cHTMLFormElement() |
| inherited_from | \cDateChooser::cHTMLFormElement() |
string Name of the element
string ID of the element
string Item disabled flag (non-empty to set disabled)
string Tab index for form elements
string Key to access the field
\nonecHTMLTextbox($name, $initvalue, $width, $maxlength, $id, $disabled, $tabindex, $accesskey) : \none
Creates an HTML text box.
If no additional parameters are specified, the default width is 20 units.
| inherited_from | \cHTMLTextbox::cHTMLTextbox() |
|---|---|
| inherited_from | \cDatefield::cHTMLTextbox() |
| inherited_from | \cDateChooser::cHTMLTextbox() |
string Name of the element
string Initial value of the box
int width of the text box
int maximum input length of the box
string ID of the element
string Item disabled flag (non-empty to set disabled)
string Tab index for form elements
string Key to access the field
\nonecSwitchableDateChooser($name, $initValue)
disable()
enable()
fillCloseSkeleton() : string
| inherited_from | \cHTML::fillCloseSkeleton() |
|---|---|
| inherited_from | \cHTMLFormElement::fillCloseSkeleton() |
| inherited_from | \cHTMLTextbox::fillCloseSkeleton() |
| inherited_from | \cDatefield::fillCloseSkeleton() |
| inherited_from | \cDateChooser::fillCloseSkeleton() |
stringfilled SGML closer skeletonfillSkeleton($attributes) : string
fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| inherited_from | \cHTML::fillSkeleton() |
|---|---|
| inherited_from | \cHTMLFormElement::fillSkeleton() |
| inherited_from | \cHTMLTextbox::fillSkeleton() |
| inherited_from | \cDatefield::fillSkeleton() |
| inherited_from | \cDateChooser::fillSkeleton() |
string Attributes to set
stringfilled SGML opener skeletongetID() : string
| inherited_from | \cHTML::getID() |
|---|---|
| inherited_from | \cHTMLFormElement::getID() |
| inherited_from | \cHTMLTextbox::getID() |
| inherited_from | \cDatefield::getID() |
| inherited_from | \cDateChooser::getID() |
stringcurrent IDrender() : string
stringRendered HTMLsetAccessKey($accesskey) : \none
| inherited_from | \cHTMLFormElement::setAccessKey() |
|---|---|
| inherited_from | \cHTMLTextbox::setAccessKey() |
| inherited_from | \cDatefield::setAccessKey() |
| inherited_from | \cDateChooser::setAccessKey() |
string The length of the access key. May be A-Z and 0-9.
\nonesetAlt($alt)
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.
| inherited_from | \cHTML::setAlt() |
|---|---|
| inherited_from | \cHTMLFormElement::setAlt() |
| inherited_from | \cHTMLTextbox::setAlt() |
| inherited_from | \cDatefield::setAlt() |
| inherited_from | \cDateChooser::setAlt() |
string Text to set as the "alt" attribute
setAttribute($sAttributeName, $sValue)
| inherited_from | \cHTML::setAttribute() |
|---|---|
| inherited_from | \cHTMLFormElement::setAttribute() |
| inherited_from | \cHTMLTextbox::setAttribute() |
| inherited_from | \cDatefield::setAttribute() |
| inherited_from | \cDateChooser::setAttribute() |
string Name of the attribute
string Value of the attribute
setClass($class)
| inherited_from | \cHTML::setClass() |
|---|---|
| inherited_from | \cHTMLFormElement::setClass() |
| inherited_from | \cHTMLTextbox::setClass() |
| inherited_from | \cDatefield::setClass() |
| inherited_from | \cDateChooser::setClass() |
string Text to set as the "alt" attribute
setContentlessTag($contentlessTag)
| inherited_from | \cHTML::setContentlessTag() |
|---|---|
| inherited_from | \cHTMLFormElement::setContentlessTag() |
| inherited_from | \cHTMLTextbox::setContentlessTag() |
| inherited_from | \cDatefield::setContentlessTag() |
| inherited_from | \cDateChooser::setContentlessTag() |
setDisabled($disabled) : \none
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.
| inherited_from | \cHTMLFormElement::setDisabled() |
|---|---|
| inherited_from | \cHTMLTextbox::setDisabled() |
| inherited_from | \cDatefield::setDisabled() |
| inherited_from | \cDateChooser::setDisabled() |
string Sets the disabled-flag if non-empty
\nonesetEvent($event, $action)
example: $item->setEvent("change","document.forms[0].submit");
| inherited_from | \cHTML::setEvent() |
|---|---|
| inherited_from | \cHTMLFormElement::setEvent() |
| inherited_from | \cHTMLTextbox::setEvent() |
| inherited_from | \cDatefield::setEvent() |
| inherited_from | \cDateChooser::setEvent() |
string Type of the event
string Function or action to call (JavaScript Code)
setGenerateXHTML(bool $value)
| inherited_from | \cHTML::setGenerateXHTML() |
|---|---|
| inherited_from | \cHTMLFormElement::setGenerateXHTML() |
| inherited_from | \cHTMLTextbox::setGenerateXHTML() |
| inherited_from | \cDatefield::setGenerateXHTML() |
| inherited_from | \cDateChooser::setGenerateXHTML() |
bool
setID($id)
| inherited_from | \cHTML::setID() |
|---|---|
| inherited_from | \cHTMLFormElement::setID() |
| inherited_from | \cHTMLTextbox::setID() |
| inherited_from | \cDatefield::setID() |
| inherited_from | \cDateChooser::setID() |
setMaxLength($maxlen) : \none
| inherited_from | \cHTMLTextbox::setMaxLength() |
|---|---|
| inherited_from | \cDatefield::setMaxLength() |
| inherited_from | \cDateChooser::setMaxLength() |
int maximum input length
\nonesetReadOnly($bReadOnly)
| inherited_from | \cDateChooser::setReadOnly() |
|---|
setSelectsToHide($aSelectIDs)
| inherited_from | \cDateChooser::setSelectsToHide() |
|---|
setStyle($style)
| inherited_from | \cHTML::setStyle() |
|---|---|
| inherited_from | \cHTMLFormElement::setStyle() |
| inherited_from | \cHTMLTextbox::setStyle() |
| inherited_from | \cDatefield::setStyle() |
| inherited_from | \cDateChooser::setStyle() |
setStyleDefinition($entity, $definition) : string
| inherited_from | \cHTML::setStyleDefinition() |
|---|---|
| inherited_from | \cHTMLFormElement::setStyleDefinition() |
| inherited_from | \cHTMLTextbox::setStyleDefinition() |
| inherited_from | \cDatefield::setStyleDefinition() |
| inherited_from | \cDateChooser::setStyleDefinition() |
string Entity to define
string Definition for the given entity
stringfilled SGML closing skeletonsetTabindex($tabindex) : \none
The tab index needs to be numeric, bigger than 0 and smaller than 32767.
| inherited_from | \cHTMLFormElement::setTabindex() |
|---|---|
| inherited_from | \cHTMLTextbox::setTabindex() |
| inherited_from | \cDatefield::setTabindex() |
| inherited_from | \cDateChooser::setTabindex() |
int desired tab index
\nonesetValue($value) : \none
| inherited_from | \cHTMLTextbox::setValue() |
|---|---|
| inherited_from | \cDatefield::setValue() |
| inherited_from | \cDateChooser::setValue() |
string Initial value
\nonesetWidth($width) : \none
| inherited_from | \cHTMLTextbox::setWidth() |
|---|---|
| inherited_from | \cDatefield::setWidth() |
| inherited_from | \cDateChooser::setWidth() |
int width of the text box
\nonetoHTML()
| inherited_from | \cHTML::toHTML() |
|---|---|
| inherited_from | \cHTMLFormElement::toHTML() |
| inherited_from | \cHTMLTextbox::toHTML() |
| inherited_from | \cDatefield::toHTML() |
| inherited_from | \cDateChooser::toHTML() |
toHtml() : string
| inherited_from | \cHTMLTextbox::toHtml() |
|---|---|
| inherited_from | \cDatefield::toHtml() |
| inherited_from | \cDateChooser::toHtml() |
stringRendered HTMLunsetEvent($event)
example: $item->unsetEvent("change");
| inherited_from | \cHTML::unsetEvent() |
|---|---|
| inherited_from | \cHTMLFormElement::unsetEvent() |
| inherited_from | \cHTMLTextbox::unsetEvent() |
| inherited_from | \cDatefield::unsetEvent() |
| inherited_from | \cDateChooser::unsetEvent() |
string Type of the event
$_aEventDefinitions
| inherited_from | \cHTML::$$_aEventDefinitions |
|---|---|
| inherited_from | \cHTMLFormElement::$$_aEventDefinitions |
| inherited_from | \cHTMLTextbox::$$_aEventDefinitions |
| inherited_from | \cDatefield::$$_aEventDefinitions |
| inherited_from | \cDateChooser::$$_aEventDefinitions |
$_aStyleDefinitions
| inherited_from | \cHTML::$$_aStyleDefinitions |
|---|---|
| inherited_from | \cHTMLFormElement::$$_aStyleDefinitions |
| inherited_from | \cHTMLTextbox::$$_aStyleDefinitions |
| inherited_from | \cDatefield::$$_aStyleDefinitions |
| inherited_from | \cDateChooser::$$_aStyleDefinitions |
$_bDisabled
$_bReadOnly
$_content
| inherited_from | \cHTML::$$_content |
|---|---|
| inherited_from | \cHTMLFormElement::$$_content |
| inherited_from | \cHTMLTextbox::$$_content |
| inherited_from | \cDatefield::$$_content |
| inherited_from | \cDateChooser::$$_content |
$_contentlessTag : boolean
| access | private |
|---|---|
| inherited_from | \cHTML::$$_contentlessTag |
| inherited_from | \cHTMLFormElement::$$_contentlessTag |
| inherited_from | \cHTMLTextbox::$$_contentlessTag |
| inherited_from | \cDatefield::$$_contentlessTag |
| inherited_from | \cDateChooser::$$_contentlessTag |
$_oButton
| inherited_from | \cDateChooser::$$_oButton |
|---|
$_oCalendar
| inherited_from | \cDateChooser::$$_oCalendar |
|---|
$_oCheckBox
$_oDate
| inherited_from | \cDatefield::$$_oDate |
|---|---|
| inherited_from | \cDateChooser::$$_oDate |
$_oImage
| inherited_from | \cDateChooser::$$_oImage |
|---|
$_requiredScripts : array
| access | private |
|---|---|
| inherited_from | \cHTML::$$_requiredScripts |
| inherited_from | \cHTMLFormElement::$$_requiredScripts |
| inherited_from | \cHTMLTextbox::$$_requiredScripts |
| inherited_from | \cDatefield::$$_requiredScripts |
| inherited_from | \cDateChooser::$$_requiredScripts |
$_skeleton_close : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_close |
| inherited_from | \cHTMLFormElement::$$_skeleton_close |
| inherited_from | \cHTMLTextbox::$$_skeleton_close |
| inherited_from | \cDatefield::$$_skeleton_close |
| inherited_from | \cDateChooser::$$_skeleton_close |
$_skeleton_open : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_open |
| inherited_from | \cHTMLFormElement::$$_skeleton_open |
| inherited_from | \cHTMLTextbox::$$_skeleton_open |
| inherited_from | \cDatefield::$$_skeleton_open |
| inherited_from | \cDateChooser::$$_skeleton_open |
$_skeleton_single : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_single |
| inherited_from | \cHTMLFormElement::$$_skeleton_single |
| inherited_from | \cHTMLTextbox::$$_skeleton_single |
| inherited_from | \cDatefield::$$_skeleton_single |
| inherited_from | \cDateChooser::$$_skeleton_single |
$_styledefs : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_styledefs |
| inherited_from | \cHTMLFormElement::$$_styledefs |
| inherited_from | \cHTMLTextbox::$$_styledefs |
| inherited_from | \cDatefield::$$_styledefs |
| inherited_from | \cDateChooser::$$_styledefs |
$_tag : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_tag |
| inherited_from | \cHTMLFormElement::$$_tag |
| inherited_from | \cHTMLTextbox::$$_tag |
| inherited_from | \cDatefield::$$_tag |
| inherited_from | \cDateChooser::$$_tag |