HTML Select Element
author | Timo A. Hummel |
---|
__toString() : string
inherited_from | \cHTML::__toString() |
---|---|
inherited_from | \cHTMLFormElement::__toString() |
inherited_from | \cHTMLSelectElement::__toString() |
string
Generated markup_setContent($content)
inherited_from | \cHTML::_setContent() |
---|---|
inherited_from | \cHTMLFormElement::_setContent() |
inherited_from | \cHTMLSelectElement::_setContent() |
string/object String with the content or an object to render.
addArticles(int $iIDCat, bool $bColored, bool $bArtOnline, string $sSpaces) : int
Adds articles to select box values.
int
idcat of the category to be listed
bool
Add color information to option elements
bool
If true, only online articles will be added
string
Just some "" to show data hierarchically (used in conjunction with addCategories)
int
Number of items addedaddCategories(int $iMaxLevel, bool $bColored, bool $bCatVisible, bool $bCatPublic, bool $bWithArt, bool $bArtOnline) : int
Adds category elements (optionally including articles) to select box values. Note: Using "with articles" adds the articles also - but the categories will get a negative value! There is no way to distinguish between a category id and an article id...
int
Max. level shown (to be exact: except this level)
bool
Add color information to option elements
bool
If true, only add idcat as value, if cat is visible
bool
If true, only add idcat as value, if cat is public
bool
Add also articles per category
bool
If true, show only online articles
int
Number of items addedaddOptionElement($index, $element) : \none
inherited_from | \cHTMLSelectElement::addOptionElement() |
---|
string Index of the element
object Filled cHTMLOptionElement to add
\none
addRequiredScript($script)
inherited_from | \cHTML::addRequiredScript() |
---|---|
inherited_from | \cHTMLFormElement::addRequiredScript() |
inherited_from | \cHTMLSelectElement::addRequiredScript() |
addTypesFromArt(int $iIDCatArt, string $sTypeRange) : int
Adds types and type ids which are available for the specified article
int
Article id
string
Komma separated list of Contenido type ids which may be in the resulting list (e.g. '1','17','28')
int
Number of items addedadvanceID()
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 | \cHTMLSelectElement::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 | \cHTMLSelectElement::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 | \cHTMLSelectElement::attachStyleDefinition() |
string Name for a style definition
string Definition for the given entity
string
filled SGML closing skeletonautoFill($stuff) : \none
Array format: $stuff = array( array("value","title"), array("value","title"));
or regular key => value arrays.
inherited_from | \cHTMLSelectElement::autoFill() |
---|
array Array with all items
\none
cHTML()
inherited_from | \cHTML::cHTML() |
---|---|
inherited_from | \cHTMLFormElement::cHTML() |
inherited_from | \cHTMLSelectElement::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 | \cHTMLSelectElement::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
\none
cHTMLInputSelectElement(string $sName, int $iWidth, string $sID, string $bDisabled, int $iTabIndex, $sAccessKey) : \none
Creates an HTML select field (aka "DropDown").
string
Name of the element
int
Width of the select element
string
ID of the element
string
Item disabled flag (non-empty to set disabled)
int
Tab index for form elements
\none
cHTMLSelectElement($name, $width, $id, $disabled, $tabindex, $accesskey) : \none
Creates an HTML select field (aka "DropDown").
inherited_from | \cHTMLSelectElement::cHTMLSelectElement() |
---|
string Name of the element
int width of the select 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
\none
fillCloseSkeleton() : string
inherited_from | \cHTML::fillCloseSkeleton() |
---|---|
inherited_from | \cHTMLFormElement::fillCloseSkeleton() |
inherited_from | \cHTMLSelectElement::fillCloseSkeleton() |
string
filled 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 | \cHTMLSelectElement::fillSkeleton() |
string Attributes to set
string
filled SGML opener skeletongetDefault() : \Selected
inherited_from | \cHTMLSelectElement::getDefault() |
---|
\Selected
"lvalue"getID() : string
inherited_from | \cHTML::getID() |
---|---|
inherited_from | \cHTMLFormElement::getID() |
inherited_from | \cHTMLSelectElement::getID() |
string
current IDrender() : string
inherited_from | \cHTML::render() |
---|---|
inherited_from | \cHTMLFormElement::render() |
inherited_from | \cHTMLSelectElement::render() |
string
Rendered HTMLsetAccessKey($accesskey) : \none
inherited_from | \cHTMLFormElement::setAccessKey() |
---|---|
inherited_from | \cHTMLSelectElement::setAccessKey() |
string The length of the access key. May be A-Z and 0-9.
\none
setAlt($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 | \cHTMLSelectElement::setAlt() |
string Text to set as the "alt" attribute
setAttribute($sAttributeName, $sValue)
inherited_from | \cHTML::setAttribute() |
---|---|
inherited_from | \cHTMLFormElement::setAttribute() |
inherited_from | \cHTMLSelectElement::setAttribute() |
string Name of the attribute
string Value of the attribute
setClass($class)
inherited_from | \cHTML::setClass() |
---|---|
inherited_from | \cHTMLFormElement::setClass() |
inherited_from | \cHTMLSelectElement::setClass() |
string Text to set as the "alt" attribute
setContentlessTag($contentlessTag)
inherited_from | \cHTML::setContentlessTag() |
---|---|
inherited_from | \cHTMLFormElement::setContentlessTag() |
inherited_from | \cHTMLSelectElement::setContentlessTag() |
setDefault($lvalue) : \none
inherited_from | \cHTMLSelectElement::setDefault() |
---|
string Specifies the "value" of the cHTMLOptionElement to set
\none
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 | \cHTMLSelectElement::setDisabled() |
string Sets the disabled-flag if non-empty
\none
setEvent($event, $action)
example: $item->setEvent("change","document.forms[0].submit");
inherited_from | \cHTML::setEvent() |
---|---|
inherited_from | \cHTMLFormElement::setEvent() |
inherited_from | \cHTMLSelectElement::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 | \cHTMLSelectElement::setGenerateXHTML() |
bool
setID($id)
inherited_from | \cHTML::setID() |
---|---|
inherited_from | \cHTMLFormElement::setID() |
inherited_from | \cHTMLSelectElement::setID() |
setMultiselect()
inherited_from | \cHTMLSelectElement::setMultiselect() |
---|
setSelected(array $aElements) : \none
array
Array with "values" of the cHTMLOptionElement to set
\none
setSize($size)
inherited_from | \cHTMLSelectElement::setSize() |
---|
setStyle($style)
inherited_from | \cHTML::setStyle() |
---|---|
inherited_from | \cHTMLFormElement::setStyle() |
inherited_from | \cHTMLSelectElement::setStyle() |
setStyleDefinition($entity, $definition) : string
inherited_from | \cHTML::setStyleDefinition() |
---|---|
inherited_from | \cHTMLFormElement::setStyleDefinition() |
inherited_from | \cHTMLSelectElement::setStyleDefinition() |
string Entity to define
string Definition for the given entity
string
filled 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 | \cHTMLSelectElement::setTabindex() |
int desired tab index
\none
toHTML()
inherited_from | \cHTML::toHTML() |
---|---|
inherited_from | \cHTMLFormElement::toHTML() |
inherited_from | \cHTMLSelectElement::toHTML() |
toHtml() : string
inherited_from | \cHTMLSelectElement::toHtml() |
---|
string
Rendered HTMLunsetEvent($event)
example: $item->unsetEvent("change");
inherited_from | \cHTML::unsetEvent() |
---|---|
inherited_from | \cHTMLFormElement::unsetEvent() |
inherited_from | \cHTMLSelectElement::unsetEvent() |
string Type of the event
$_aEventDefinitions
inherited_from | \cHTML::$$_aEventDefinitions |
---|---|
inherited_from | \cHTMLFormElement::$$_aEventDefinitions |
inherited_from | \cHTMLSelectElement::$$_aEventDefinitions |
$_aStyleDefinitions
inherited_from | \cHTML::$$_aStyleDefinitions |
---|---|
inherited_from | \cHTMLFormElement::$$_aStyleDefinitions |
inherited_from | \cHTMLSelectElement::$$_aStyleDefinitions |
$_content
inherited_from | \cHTML::$$_content |
---|---|
inherited_from | \cHTMLFormElement::$$_content |
inherited_from | \cHTMLSelectElement::$$_content |
$_contentlessTag : boolean
access | private |
---|---|
inherited_from | \cHTML::$$_contentlessTag |
inherited_from | \cHTMLFormElement::$$_contentlessTag |
inherited_from | \cHTMLSelectElement::$$_contentlessTag |
$_requiredScripts : array
access | private |
---|---|
inherited_from | \cHTML::$$_requiredScripts |
inherited_from | \cHTMLFormElement::$$_requiredScripts |
inherited_from | \cHTMLSelectElement::$$_requiredScripts |
$_skeleton_close : string
access | private |
---|---|
inherited_from | \cHTML::$$_skeleton_close |
inherited_from | \cHTMLFormElement::$$_skeleton_close |
inherited_from | \cHTMLSelectElement::$$_skeleton_close |
$_skeleton_open : string
access | private |
---|---|
inherited_from | \cHTML::$$_skeleton_open |
inherited_from | \cHTMLFormElement::$$_skeleton_open |
inherited_from | \cHTMLSelectElement::$$_skeleton_open |
$_skeleton_single : string
access | private |
---|---|
inherited_from | \cHTML::$$_skeleton_single |
inherited_from | \cHTMLFormElement::$$_skeleton_single |
inherited_from | \cHTMLSelectElement::$$_skeleton_single |
$_styledefs : string
access | private |
---|---|
inherited_from | \cHTML::$$_styledefs |
inherited_from | \cHTMLFormElement::$$_styledefs |
inherited_from | \cHTMLSelectElement::$$_styledefs |
$_tag : string
access | private |
---|---|
inherited_from | \cHTML::$$_tag |
inherited_from | \cHTMLFormElement::$$_tag |
inherited_from | \cHTMLSelectElement::$$_tag |