Libraries.Web.Page.Input Documentation

The Input class represents HTML's (Hypertext Markup Language) input tag which defines an input control within a Form. The type of control is defined by the type attribute. You can find more information about this tag at: The input attribute.

Example Code



use Libraries.Web.Page.all
class Main
action main
    //make a web page
    WebPage page
    //make a Form
    Form myForm
    //make a input
    Input myInput
    myInput:SetType("tel")
    myForm:Add(myInput)
    page:AddToBody(myForm)
end
end

Inherits from: Libraries.Web.Page.AttributeAccepter, Libraries.Web.Page.KeyboardAttributeAccepter, Libraries.Web.Page.FormAttributeAccepter, Libraries.Web.Page.GlobalAttributeAccepter, Libraries.Web.Page.WebTag, Libraries.Language.Object, Libraries.Web.Page.MouseAttributeAccepter, Libraries.Web.Page.FlowContent

Actions Documentation

Add(Libraries.Web.Page.Attribute attribute)

This action adds an attribute to this object. If an attribute with the same name as

Parameters

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

Attribute attribute
attribute:SetName("src")
attribute:SetValue("http://www.google.com")

AttributeAccepter accept
accept:Add(attribute)

AddAttribute(text name, text value)

This action adds an attribute to this object. This action is a helper action, which essentially does the same thing as the Add(Attribute) action. If an attribute with the same name as

Parameters

  • text name: The name of the attribute functions as a key. For example, in a link, we might have a "src" and an actual address, like google.com. In this case, the name would be equivalent to the src.
  • text value: As an example of link, imagine we have a value of "src" and an actual address, like google.com. In this case, the value would be equivalent to google.com.

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")

AddClassAttribute(text value)

Adds to the ClassAttribute attribute. Multiple class names can be listed in the passed text, separated by a space.

Parameters

  • text value: The classes to be added to the element

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:AddClassAttribute("myClass")

AddNestedTag(Libraries.Web.Page.WebTag tag)

This action adds a WebTag to the list of WebTags contained within the current WebTag.

Parameters

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData


//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)

AddText(text value)

This action sets the description text for this WebTag.

Parameters

  • text value: The text contained in the WebTag.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:AddDescription("name")
row:Add(cell)

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

Generate()

This action sets the width attribute. The width attribute specifies the width of an image input control.

Return

text:

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetWidth("15")

GenerateAttributes()

This action returns a text description of all attributes stored.

Return

text:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
text result = accept:GenerateAttributes()

GenerateNestedTags()

This action generates the HTML output text of all of the nested WebTags.

Return

text: The text including all webtags within this WebTag.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
output row:GenerateNestedTags()

GetAccept()

This action gets the accept attribute. The value can be accessed by calling the GetValue() action on the returned accept attribute. It specifies the file types that will be accepted by the server. Multiple values are to be seperated by a coma. Accptable values: audio/* video/* image/* MIME_type

Return

Libraries.Web.Page.Attribute: The accept attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute accept = myInput:GetAccept()
text acceptValue = ""
if accept not= undefined
    acceptValue = accept:GetValue()
end

GetAccessKey()

Returns the AccessKey attribute. Specifies a shortcut key for the web element.

Return

Libraries.Web.Page.Attribute: The current AccessKey attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetAccessKey()

GetAlternate()

This action gets the alternate attribute. The value can be accessed by calling the GetValue() action on the returned alternate attribute. The alternate specifies alternate text for images.

Return

Libraries.Web.Page.Attribute: The alternate attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute alternate = myInput:GetAlternate()
text alternateValue = ""
if alternate not= undefined
    alternateValue = alternate:GetValue()
end

GetAttribute(text name)

This action returns an attribute from this object's Attributes object. If no attribute exists for a given key, this action returns undefined.

Parameters

  • text name

Return

Libraries.Web.Page.Attribute:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
//as we have not set any attribute, this would
//return undefined
Attribute attribute = accept:GetAttribute("src")

GetAttributeValue(text name)

This action returns an attribute from this object's Attributes object. If no attribute exists for a given key, this action returns undefined.

Parameters

  • text name: The key value in this case is described in more detail in the documentation for this class's Add actions.

Return

text:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
text value = accept:GetAttributeValue("src")

GetAttributes()

Returns a list of all attributes on the system.

Return

Libraries.Web.Page.Attributes: The attributes class contains all of the attributes that have been set for this object.

Example



use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attributes

AttributeAccepter accept
Attributes attributes = accept:GetAttributes()

GetAutocomplete()

This action gets the value of the autocomplete attribute. Autocomplete is true by default. When true the browser will attempt to autocomplete the input field.

Return

boolean: The autocomplete attribute value.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
boolean inputAutocomplete = myInput:GetAutocomplete()

GetAutofocus()

This action gets the value of the autofocus attribute. Autofocus is false by default. When true the browser place the focus on the input value when the page loads.

Return

boolean: The autofocus attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputAutofocus = myInput:GetAutofocus()

GetChecked()

This action gets the value of the checked attribute. The checked attribute is only valid when the input control is of type checkbox or radio. The default value is false. When true the radio button or checkbox will be checked after the page loads.

Return

boolean: The checked attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputChecked = myInput:GetChecked()

GetClassAttribute()

Returns the ClassAttribute attribute.

Return

Libraries.Web.Page.Attribute: The current ClassAttribute attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetClassAttribute()

GetContentEditable()

Returns the ContentEditable attribute.

Return

Libraries.Web.Page.Attribute: The current ContentEditable attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetContentEditable()

GetContextMenu()

Returns the ContextMenu attribute.

Return

Libraries.Web.Page.Attribute: The current ContextMenu attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetContextMenu()

GetDefaultValue()

This action gets the defaultValue attribute. The value can be accessed by calling the GetValue() action on the returned defaultValue attribute. The defaultValue attribute specifies the default value of the input control.

Return

Libraries.Web.Page.Attribute: The defaultValue attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute defaultValue = myInput:GetDefaultValue()
text defaultValueValue = ""
if defaultValue not= undefined
    defaultValueValue = defaultValue:GetValue()
end

GetDisabled()

This action gets the value of the disabled attribute. The default value is false. When true the input control will not be clickable. This is ignored when the input control is of type hidden.

Return

boolean: The disabled attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputDisabled = myInput:GetDisabled()

GetDraggable()

Returns the Draggable attribute.

Return

Libraries.Web.Page.Attribute: The current Draggable attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetDraggable()

GetDropZone()

Returns the DropZone attribute.

Return

Libraries.Web.Page.Attribute: The current DropZone attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetDropZone()

GetFormAction()

This action gets the formAction attribute. The value can be accessed by calling the GetValue() action on the returned formAction attribute. The formAction attribute specifies the address of the file that will process the input control when the form is submitted.

Return

Libraries.Web.Page.Attribute: The formAction attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute formAction = myInput:GetFormAction()
text formActionValue = ""
if formAction not= undefined
    formActionValue = formAction:GetValue()
end

GetFormEncodedType()

This action gets the formEncodedType attribute. The value can be accessed by calling the GetValue() action on the returned formEncodedType attribute. The formEncodedType specifies the form encoding. Acceptable values: application/x-www-form-urlencoded multipart/form-data text/plain

Return

Libraries.Web.Page.Attribute: The formEncodedType attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute formEncodedType = myInput:GetFormEncodedType()
text formEncodedTypeValue = ""
if formEncodedType not= undefined
    formEncodedTypeValue = formEncodedType:GetValue()
end

GetFormMethod()

This action gets the formMethod attribute. The value can be accessed by calling the GetValue() action on the returned formMethod attribute. The formMethod attribute specifies the protocol method in which the form data will be sent to the formAction address.

Return

Libraries.Web.Page.Attribute: The formMethod attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute formMethod = myInput:GetFormMethod()
text formMethodValue = ""
if formMethod not= undefined
    formMethodValue = formMethod:GetValue()
end

GetFormName()

This action gets the formName attribute. The value can be accessed by calling the GetValue() action on the returned formName attribute. The formId attribute specifies the form the input is accociated with.

Return

Libraries.Web.Page.Attribute: The formName attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute formName = myInput:GetFormName()
text formNameValue = ""
if formName not= undefined
    formNameValue = formName:GetValue()
end

GetFormNovalidate()

This action gets the value of the formNovalidate attribute. The default value is false. When true the form will not be validated upon submission. This attribute is only used for input controls of type submit.

Return

boolean: The formNovalidate attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputFormNovalidate = myInput:GetFormNovalidate()

GetFormTarget()

This action gets the formTarget attribute. The value can be accessed by calling the GetValue() action on the returned formTarget attribute. The formTarget attribute specifies which frame the form response is to be opened in. Acceptable Values: _blank _parent _top _self existing frame name

Return

Libraries.Web.Page.Attribute: The formTarget attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute formTarget = myInput:GetFormTarget()
text formTarGetValue = ""
if formTarget not= undefined
    formTarGetValue = formTarget:GetValue()
end

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetHeight()

This action gets the height attribute. The value can be accessed by calling the GetValue() action on the returned height attribute. The height attribute is only used for input controls of type image and specifies the height of the image.

Return

Libraries.Web.Page.Attribute: The height attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute height = myInput:GetHeight()
text heightValue = ""
if height not= undefined
    heightValue = height:GetValue()
end

GetHidden()

Returns the Hidden attribute.

Return

Libraries.Web.Page.Attribute: The current Hidden attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetHidden()

GetIdentifier()

Returns the Identifier attribute.

Return

Libraries.Web.Page.Attribute: The current Identifier attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetIdentifier()

GetImageAddress()

This action gets the imageAddress attribute. The value can be accessed by calling the GetValue() action on the returned imageAddress attribute. The imageAddress attribute specifies the address of the image input control.

Return

Libraries.Web.Page.Attribute: The imageAddress attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute imageAddress = myInput:GetImageAddress()
text imageAddressValue = ""
if imageAddress not= undefined
    imageAddressValue = imageAddress:GetValue()
end

GetIterator()

This action returns an iterator of all attributes stored in this object.

Return

Libraries.Containers.Iterator:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute
use Libraries.Containers.Iterator

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")

//output out all of the attributes
Iterator<Attribute> it =  accept:GetIterator()
repeat while it:HasNext()
    Attribute at = it:Next()
    output at:Generate()
end

GetLanguage()

Returns the Language attribute.

Return

Libraries.Web.Page.Attribute: The current Language attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetLanguage()

GetList()

This action gets the list attribute. The value can be accessed by calling the GetValue() action on the returned list attribute. The list attribute specifies the pre-defined datalist that is to be used by the input control.

Return

Libraries.Web.Page.Attribute: The list attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute list = myInput:GetList()
text listValue = ""
if list not= undefined
    listValue = list:GetValue()
end

GetMax()

This action gets the max attribute. The value can be accessed by calling the GetValue() action on the returned max attribute. The max attribute specifies the maximum value for controls of type number, range, date, datetime, datetime-local, month, time and week.

Return

Libraries.Web.Page.Attribute: The max attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute max = myInput:GetMax()
text maxValue = ""
if max not= undefined
    maxValue = max:GetValue()
end

GetMaxLength()

This action gets the maxLength attribute. The value can be accessed by calling the GetValue() action on the returned maxLength attribute. The maxLength attribute specifies the maximum number of characters allowed in an input control.

Return

Libraries.Web.Page.Attribute: The maxLength attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute maxLength = myInput:GetMaxLength()
text maxLengthValue = ""
if maxLength not= undefined
    maxLengthValue = maxLength:GetValue()
end

GetMin()

This action gets the min attribute. The value can be accessed by calling the GetValue() action on the returned min attribute. The min attribute specifies the minimum value for controls of type number, range, date, datetime, datetime-local, month, time and week.

Return

Libraries.Web.Page.Attribute: The min attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute min = myInput:GetMin()
text minValue = ""
if min not= undefined
    minValue = min:GetValue()
end

GetMultiple()

This action gets the value of the multiple attribute. The default value is false. When true the email or file control will accept multiple values.

Return

boolean: The multiple attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputMultiple = myInput:GetMultiple()

GetName()

This action gets the name attribute. The value can be accessed by calling the GetValue() action on the returned name attribute. The name attribute specifies the name of the input control.

Return

Libraries.Web.Page.Attribute: The name attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute name = myInput:GetName()
text nameValue = ""
if name not= undefined
    nameValue = name:GetValue()
end

GetNumberOfAttributes()

This action returns the number of attributes that are currently stored in this object.

Return

integer:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
integer num = accept:GetNumberOfAttributes()

GetNumberOfNestedTags()

This action gets the number of nested tags within the current WebTag.

Return

integer: The number of nested tags.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
integer numTags = row:GetSize()

GetOnBlur()

Returns the onblur attribute. If the onblur attribute is enabled the form element has lost focus.

Return

Libraries.Web.Page.Attribute: The current onblur attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnBlur()

GetOnChange()

Returns the OnChange attribute. If the OnChange event occurs when a form elements state, text, or selection is changed.

Return

Libraries.Web.Page.Attribute: The current OnChange event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnChange()

GetOnClick()

Returns the OnClick attribute. If a on click event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnClick attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnClick()

GetOnContextMenu()

Returns the OnContextMenu attribute. If the OnContextMenu specifies the script to run when a context menu is triggered.

Return

Libraries.Web.Page.Attribute: The current OnContextMenu attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnContextMenu()

GetOnDoubleClick()

Returns the OnDoubleClick attribute. If a on double click event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDoubleClick attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDoubleClick()

GetOnDrag()

Returns the OnDrag attribute. If a on drag event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDrag attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDrag()

GetOnDragEnd()

Returns the OnDragEnd attribute. If a on drag end event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDragEnd attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDragEnd()

GetOnDragEnter()

Returns the OnDragEnter attribute. If a on drag into area event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDragEnter attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDragEnter()

GetOnDragLeave()

Returns the OnDragLeave attribute. If a on drag out of area event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDragLeave attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDragLeave()

GetOnDragOver()

Returns the OnDragOver attribute. If a on drag over event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDragOver attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDragOver()

GetOnDragStart()

Returns the OnDragStart attribute. If a on drag start event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDragStart attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDragStart()

GetOnDrop()

Returns the OnDrop attribute. If a on drop item event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDrop attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnDrop()

GetOnFocus()

Returns the OnFocus attribute. If the OnFocus event occurs when a form element gains focus.

Return

Libraries.Web.Page.Attribute: The current OnFocus event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnFocus()

GetOnFormChange()

Returns the OnFormChange attribute. If the OnFormChange stores the script to be run when a form change occurs.

Return

Libraries.Web.Page.Attribute: The current OnFormChange script attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnFormChange()

GetOnFormInput()

Returns the OnFormInput attribute. If the OnFormInput is triggered, by a form recieving input, the specified script will be run.

Return

Libraries.Web.Page.Attribute: The current OnFormInput event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnFormInput()

GetOnInput()

Returns the OnInput attribute. If the OnInput is triggered, by a form element recieving input, the specified script will be run.

Return

Libraries.Web.Page.Attribute: The current OnInput event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnInput()

GetOnInvalid()

Returns the OnInvalid attribute. If the OnInvalid is triggered, by a form element recieving invalid input, the specified script will be run.

Return

Libraries.Web.Page.Attribute: The current OnInvalid event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnInvalid()

GetOnKeyDown()

Returns the OnKeyDown attribute. If a key down event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnKeyDown attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
Attribute attribute = accept:GetOnKeyDown()

GetOnKeyPress()

Returns the OnKeyPress attribute. If a key press event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnKeyPress attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
Attribute attribute = accept:GetOnKeyPress()

GetOnKeyUp()

Returns the OnKeyUp attribute. If a key up event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnKeyUp attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
Attribute attribute = accept:GetOnKeyUp()

GetOnMouseDown()

Returns the OnMouseDown attribute. If a on mouse button down event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseDown attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseDown()

GetOnMouseMove()

Returns the OnMouseMove attribute. If a on mouse move event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseMove attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseMove()

GetOnMouseOut()

Returns the OnMouseOut attribute. If a on mouse out of area event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseOut attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseOut()

GetOnMouseOver()

Returns the OnMouseOver attribute. If a on mouse over event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseOver attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseOver()

GetOnMouseUp()

Returns the OnMouseUp attribute. If a on mouse button up event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseUp attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseUp()

GetOnMouseWheel()

Returns the OnMouseWheel attribute. If a mouse wheel scroll event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMouseWheel attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnMouseWheel()

GetOnScroll()

Returns the OnScroll attribute. If a on scroll event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnScroll attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
Attribute attribute = accept:GetOnScroll()

GetOnSelect()

Returns the OnSelect attribute. OnSelect is triggered by the selection of an elements text on the form.

Return

Libraries.Web.Page.Attribute: The current OnSelect event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnSelect()

GetOnSubmit()

Returns the OnSubmit attribute. The OnSubmit is triggered by a submit action on the form.

Return

Libraries.Web.Page.Attribute: The current OnSubmit event attribute.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
Attribute attribute = accept:GetOnSubmit()

GetPattern()

This action gets the pattern attribute. The value can be accessed by calling the GetValue() action on the returned pattern attribute. The pattern attribute defines a regular expression for the input control when it is of type text, search, url, tel, email, or password.

Return

Libraries.Web.Page.Attribute: The pattern attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute pattern = myInput:GetPattern()
text patternValue = ""
if pattern not= undefined
    patternValue = pattern:GetValue()
end

GetPlaceHolder()

This action gets the placeHolder attribute. The value can be accessed by calling the GetValue() action on the returned placeHolder attribute. The placeHolder attribute acts as a description of the desired input. It will be shown upon page load and dissappear when the value is edited. The placeHolder attribute is only used when the input control is of type text, search, url, tel, email, or password.

Return

Libraries.Web.Page.Attribute: The placeHolder attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute placeHolder = myInput:GetPlaceHolder()
text placeHolderValue = ""
if placeHolder not= undefined
    placeHolderValue = placeHolder:GetValue()
end

GetReadOnly()

This action gets the value of the readOnly attribute. The default value is false. When true the input control's value cannot be modified.

Return

boolean: The readOnly attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputReadOnly = myInput:GetReadOnly()

GetRequired()

This action gets the value of the required attribute. The default value is false. When true the input control's value must be edited before submission.

Return

boolean: The required attribute.

Example


use Libraries.Web.Page.Input
Input myInput
boolean inputRequired = myInput:GetRequired()

GetSize()

This action gets the size attribute. The value can be accessed by calling the GetValue() action on the returned size attribute. The size specifies the character width of an input control if it is of type text, search, tel, url, email, or password.

Return

Libraries.Web.Page.Attribute: The size attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute size = myInput:GetSize()
text sizeValue = ""
if size not= undefined
    sizeValue = size:GetValue()
end

GetSpellcheck()

Returns the Spellcheck attribute.

Return

Libraries.Web.Page.Attribute: The current Spellcheck attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetSpellcheck()

GetStep()

This action gets the step attribute. The value can be accessed by calling the GetValue() action on the returned step attribute. The step specifies the legal number intervals for the input control when it is of type number, range, date, datetime, datetime-local, month, time or week.

Return

Libraries.Web.Page.Attribute: The step attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute step = myInput:GetStep()
text stepValue = ""
if step not= undefined
    stepValue = step:GetValue()
end

GetStyle()

Returns the Style attribute.

Return

Libraries.Web.Page.Attribute: The current Style attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetStyle()

GetTabIndex()

Returns the TabIndex attribute.

Return

Libraries.Web.Page.Attribute: The current TabIndex attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTabIndex()

GetTag(integer index)

This action gets the number of nested tags within the current WebTag.

Parameters

  • integer index

Return

Libraries.Web.Page.WebTag: The number of nested tags.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
WebTag tag = row:GetTag(0)

GetTextDirection()

Returns the TextDirection attribute.

Return

Libraries.Web.Page.Attribute: The current TextDirection attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTextDirection()

GetTitle()

Returns the Title attribute.

Return

Libraries.Web.Page.Attribute: The current Title attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTitle()

GetType()

This action gets the type attribute. The value can be accessed by calling the GetValue() action on the returned type attribute. The type attribute specifies the type of the input control. Acceptable values: button checkbox color date datetime datetime-local email file hidden image month number password radio range reset search submit tel text time url week

Return

Libraries.Web.Page.Attribute: The type attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute type = myInput:GetType()
text typeValue = ""
if type not= undefined
    typeValue = type:GetValue()
end

GetWidth()

This action gets the width attribute. The value can be accessed by calling the GetValue() action on the returned width attribute. The width attribute specifies the width of an image input control.

Return

Libraries.Web.Page.Attribute: The width attribute.

Example


use Libraries.Web.Page.Input
use Libraries.Web.Page.Attribute
Input myInput
Attribute width = myInput:GetWidth()
text widthValue = ""
if width not= undefined
    widthValue = width:GetValue()
end

HasAttribute(text name)

This action returns whether or not an attribute exists for the key passed in as a parameter.

Parameters

  • text name: The key value in this case is described in more detail in the documentation for this class's Add actions.

Return

boolean:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
boolean exists = accept:HasAttribute("src")

Remove(Libraries.Web.Page.WebTag tag)

This action removes the first instance of a webtag found in the list of sub-WebTags.

Parameters

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
row:Remove(cell)

RemoveAttribute(text name)

This action removes an attribute with a particular key. If that attribute does not exist, then this action returns undefined.

Parameters

  • text name: The name of the attribute that should be removed.

Return

Libraries.Web.Page.Attribute:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
accept:RemoveAttribute("src")

SetAccept(text value)

This action sets the accept attribute. This value is only considered when the input type is file. It specifies the file types that will be accepted by the server. Multiple values are to be seperated by a coma. Accptable values: audio/* video/* image/* MIME_type

Parameters

  • text value: The accept of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetAccept("audio/*,text/txt")

SetAccessKey(text value)

Sets the AccessKey attribute. Specifies a shortcut key for the web element.

Parameters

  • text value: The current AccessKey.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetAccessKey("z")

SetAlternate(text value)

This action sets the alternate attribute. The alternate specifies alternate text for images.

Parameters

  • text value: The alternate of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetAlternate("Submit Button")

SetAutocomplete(boolean value)

This action sets the autocomplete attribute. Autocomplete is true by default. When true the browser will attempt to autocomplete the input field.

Parameters

  • boolean value: Boolean value that represents the autocomplete of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetAutocomplete(true)

SetAutofocus(boolean value)

This action sets the autofocus attribute. Autofocus is false by default. When true the browser place the focus on the input value when the page loads.

Parameters

  • boolean value: The autofocus of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetAutofocus(true)

SetChecked(boolean value)

This action sets the checked attribute. The checked attribute is only valid when the input control is of type checkbox or radio. The default value is false. When true the radio button or checkbox will be checked after the page loads.

Parameters

  • boolean value: The checked of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetChecked(true)

SetClassAttribute(text value)

Sets the ClassAttribute attribute. Specifies a class name for the element.

Parameters

  • text value: The current ClassAttribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetClassAttribute("myClass")

SetContentEditable(text value)

Sets the ContentEditable attribute. Specifies wether content in an element is editable.

Parameters

  • text value: The current ContentEditable.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetContentEditable("true")

SetContextMenu(text value)

Sets the ContextMenu attribute. Specifies a context menu that contains the element.

Parameters

  • text value: The current ContextMenu.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetContextMenu("parentmenu")

SetDefaultValue(text value)

This action sets the defaultValue attribute. The defaultValue attribute specifies the default value of the input control.

Parameters

  • text value: The defaultValue of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetDefaultValue("gender_female")

SetDisabled(boolean value)

This action sets the disabled attribute. The default value is false. When true the input control will not be clickable. This is ignored when the input control is of type hidden.

Parameters

  • boolean value: The disabled of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetDisabled(true)

SetDraggable(boolean value)

Sets the Draggable attribute. Specifies wether an element is draggable or not.

Parameters

  • boolean value: The current Draggable.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetDraggable(true)

SetDropZone(text value)

Sets the DropZone attribute. This element specifies what happens when an element is dropped on a web page. The three valid values are copy, move, and link.

Parameters

  • text value: The current DropZone.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetDropZone("move")

SetFormAction(text value)

This action sets the formAction attribute. The formAction attribute specifies the address of the file that will process the input control when the form is submitted.

Parameters

  • text value: The formAction of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormAction("inputFormAction.quorum")

SetFormEncodedType(text value)

This action sets the formEncodedType attribute. The formEncodedType specifies the form encoding. Acceptable values: application/x-www-form-urlencoded multipart/form-data text/plain

Parameters

  • text value: The formEncodedType of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormEncodedType("application/x-www-form-urlencoded")

SetFormMethod(text value)

This action sets the formMethod attribute. The formMethod attribute specifies the protocol method in which the form data will be sent to the formAction address.

Parameters

  • text value: The formMethod of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormMethod("get")

SetFormName(text value)

This action sets the formName attribute. The formId attribute specifies the form the input is accociated with.

Parameters

  • text value: The formName of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormName("Input Form")

SetFormNovalidate(boolean value)

This action sets the formNovalidate attribute. The default value is false. When true the form will not be validated upon submission. This attribute is only used for input controls of type submit.

Parameters

  • boolean value: The formNovalidate of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormNovalidate(true)

SetFormTarget(text value)

This action sets the formTarget attribute. The formTarget attribute specifies which frame the form response is to be opened in. Acceptable Values: _blank _parent _top _self existing frame name

Parameters

  • text value: The formTarget of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetFormTarget("_blank")

SetHeight(text value)

This action sets the height attribute. The height attribute is only used for input controls of type image and specifies the height of the image.

Parameters

  • text value: The height of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetHeight("50")

SetHidden(boolean value)

Sets the AccessKey attribute. Specifies wether an element is hidden or not.

Parameters

  • boolean value: To true to hide element and false to make it visible.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetHidden(false)

SetIdentifier(text value)

Sets the Identifier attribute. Specifies a unique name for the element.

Parameters

  • text value: The current Identifier.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetIdentifier("myElement")

SetImageAddress(text value)

This action sets the imageAddress attribute. The imageAddress attribute specifies the address of the image input control.

Parameters

  • text value: The imageAddress of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetImageAddress("go_button.jpg")

SetLanguage(text value)

Creates and sets an attribute for language. As these codes are esoteric in the standard on the web (HTML), we recommend using the LanguageCode class to help.

Parameters

  • text value

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.LanguageCode
use Libraries.Web.Page.Link

LanguageCode code
//use any WebItem, in this case a link
Link link
link:SetLanguage(code:english)

SetList(text value)

This action sets the list attribute. The list attribute specifies the pre- defined datalist that is to be used by the input control.

Parameters

  • text value: The list of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetList("input_list")

SetMax(text value)

This action sets the max attribute. The max attribute specifies the maximum value for controls of type number, range, date, datetime, datetime-local, month, time and week.

Parameters

  • text value: The max of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetMax("100")

SetMaxLength(text value)

This action sets the maxLength attribute. The maxLength attribute specifies the maximum number of characters allowed in an input control.

Parameters

  • text value: The maxLength of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetMaxLength("55")

SetMin(text value)

This action sets the min attribute. The min attribute specifies the minimum value for controls of type number, range, date, datetime, datetime-local, month, time and week.

Parameters

  • text value: The min of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetMin("9")

SetMultiple(boolean value)

This action sets the multiple attribute. The default value is false. When true the email or file control will accept multiple values.

Parameters

  • boolean value: The multiple of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetMultiple(true)

SetName(text value)

This action sets the name attribute. The name attribute specifies the name of the control.

Parameters

  • text value: The name of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetName("Male_Gender_Input")

SetOnBlur(text value)

Sets the onblur attribute. The onblur attribute is the script to be triggered when the onblur even occurs. OnBlur is fired the moment an element loses focus.

Parameters

  • text value: The current onblur script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnBlur("upperCase()")

SetOnChange(text value)

Sets the OnChange attribute. The OnChange attribute is the script to be triggered when the OnChange event occurs. OnChange is fired the moment an element content is changed on a form.

Parameters

  • text value: The current OnChange script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnChange("upperCase()")

SetOnClick(text value)

Sets the OnClick attribute script when the OnClick event is triggered.

Parameters

  • text value: The current OnClick attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnClick("doSomething()")

SetOnContextMenu(text value)

Sets the OnContextMenu attribute. The OnContextMenu attribute is the script to be triggered when the OnContextMenu event occurs. OnContextMenu is fired when a context menu is selected.

Parameters

  • text value: The current OnContextMenu script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnContextMenu("upperCase()")

SetOnDoubleClick(text value)

Sets the OnDoubleClick attribute script when the OnDoubleClick event is triggered.

Parameters

  • text value: The current OnDoubleClick attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDoubleClick("doSomething()")

SetOnDrag(text value)

Sets the OnDrag attribute script when the OnDrag event is triggered.

Parameters

  • text value: The current OnDrag attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDrag("doSomething()")

SetOnDragEnd(text value)

Sets the OnDragEnd attribute script when the OnDragEnd event is triggered.

Parameters

  • text value: The current OnDragEnd attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDragEnd("doSomething()")

SetOnDragEnter(text value)

Sets the OnDragEnter attribute script when the OnDragEnter event is triggered.

Parameters

  • text value: The current OnDragEnter attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDragEnter("doSomething()")

SetOnDragLeave(text value)

Sets the OnDragLeave attribute script when the OnDragLeave event is triggered.

Parameters

  • text value: The current OnDragLeave attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDragLeave("doSomething()")

SetOnDragOver(text value)

Sets the OnDragOver attribute script when the OnDragOver event is triggered.

Parameters

  • text value: The current OnDragOver attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDragOver("doSomething()")

SetOnDragStart(text value)

Sets the OnDragStart attribute script when the OnDragStart event is triggered.

Parameters

  • text value: The current OnDragStart attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDragStart("doSomething()")

SetOnDrop(text value)

Sets the OnDrop attribute script when the OnDrop event is triggered.

Parameters

  • text value: The current OnDrop attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnDrop("doSomething()")

SetOnFocus(text value)

Sets the OnFocus attribute. The OnFocus attribute is the script to be triggered when the OnFocus event occurs. OnFocus is fired the moment an element gains focus.

Parameters

  • text value: The current OnFocus script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnFocus("upperCase()")

SetOnFormChange(text value)

Sets the OnFormChange attribute. The OnFormChange attribute is the script to be triggered when the OnFormChange event occurs. OnFormChange is fired the moment the form is changed.

Parameters

  • text value: The current OnFormChange script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnFormChange("upperCase()")

SetOnFormInput(text value)

Sets the OnFormInput attribute. The OnFormInput attribute is the script to be triggered when the OnFormInput event occurs. OnFormInput is fired the moment the form is given input.

Parameters

  • text value: The current OnFormInput script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnFormInput("upperCase()")

SetOnInput(text value)

Sets the OnInput attribute. The OnInput attribute is the script to be triggered when the OnInput event occurs. OnInput is fired the moment a form element is given input.

Parameters

  • text value: The current OnInput script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnInput("upperCase()")

SetOnInvalid(text value)

Sets the OnInvalid attribute. The OnInvalid attribute is the script to be triggered when the OnInvalid event occurs. OnInvalid is fired the moment a form element is invalid.

Parameters

  • text value: The current OnInvalid script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnInvalid("upperCase()")

SetOnKeyDown(text value)

Sets the OnKeyDown attribute. If a key down event occurs on a specified element a script is fired based on this attribute.

Parameters

  • text value: The current OnKeyDown attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
accept:SetOnKeyDown("doSomething()")

SetOnKeyPress(text value)

Sets the OnKeyPress attribute. If a key press event occurs on a specified element a script is fired based on this attribute.

Parameters

  • text value: The current OnKeyPress attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
accept:SetOnKeyPress("doSomething()")

SetOnKeyUp(text value)

Sets the OnKeyUp attribute. If a key up event occurs on a specified element a script is fired based on this attribute.

Parameters

  • text value: The current OnKeyUp attribute.

Example



use Libraries.Web.Page.KeyboardAttributeAccepter
use Libraries.Web.Page.Attribute

KeyboardAttributeAccepter accept
accept:SetOnKeyUp("doSomething()")

SetOnMouseDown(text value)

Sets the OnMouseDown attribute script when the OnMouseDown event is triggered.

Parameters

  • text value: The current OnMouseDown attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseDown("doSomething()")

SetOnMouseMove(text value)

Sets the OnMouseMove attribute script when the OnMouseMove event is triggered.

Parameters

  • text value: The current OnMouseMove attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseMove("doSomething()")

SetOnMouseOut(text value)

Sets the OnMouseOut attribute script when the OnMouseOut event is triggered.

Parameters

  • text value: The current OnMouseOut attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseOut("doSomething()")

SetOnMouseOver(text value)

Sets the OnMouseOver attribute script when the OnMouseOver event is triggered.

Parameters

  • text value: The current OnMouseOver attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseOver("doSomething()")

SetOnMouseUp(text value)

Sets the OnMouseUp attribute script when the OnMouseUp event is triggered.

Parameters

  • text value: The current OnMouseUp attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseUp("doSomething()")

SetOnMouseWheel(text value)

Sets the OnMouseWheel attribute script when the OnMouseWheel event is triggered.

Parameters

  • text value: The current OnMouseWheel attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnMouseWheel("doSomething()")

SetOnScroll(text value)

Sets the OnScroll attribute script when the OnScroll event is triggered.

Parameters

  • text value: The current OnScroll attribute.

Example



use Libraries.Web.Page.MouseAttributeAccepter
use Libraries.Web.Page.Attribute

MouseAttributeAccepter accept
accept:SetOnScroll("doSomething()")

SetOnSelect(text value)

Sets the OnSelect attribute. The OnSelect attribute is the script to be triggered when the OnSelect event occurs. OnSelect is fired the moment a form elements text is selected.

Parameters

  • text value: The current OnSelect script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnSelect("upperCase()")

SetOnSubmit(text value)

Sets the OnSubmit attribute. The OnSubmit attribute is the script to be triggered when the OnSubmit event occurs. OnSubmit is fired the moment a submit action occurs.

Parameters

  • text value: The current OnSubmit script.

Example



use Libraries.Web.Page.FormAttributeAccepter
use Libraries.Web.Page.Attribute

FormAttributeAccepter accept
accept:SetOnSubmit("upperCase()")

SetPattern(text value)

This action sets the pattern attribute.The pattern attribute defines a regular expression for the input control when it is of type text, search, url, tel, email, or password.

Parameters

  • text value: The pattern of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetPattern("1?{{0..9}^3(-?)}^2{0..9}^4")

SetPlaceHolder(text value)

This action sets the placeHolder attribute. The placeHolder attribute acts as a description of the desired input. It will be shown upon page load and dissappear when the value is edited. The placeHolder attribute is only used when the input control is of type text, search, url, tel, email, or password.

Parameters

  • text value: The placeHolder of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetPlaceHolder("First Name")

SetReadOnly(boolean value)

This action sets the readOnly attribute. The default value is false. When true the input control's value cannot be modified.

Parameters

  • boolean value: The readOnly of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetReadOnly(true)

SetRequired(boolean value)

This action sets the required attribute. The default value is false. When true the input control's value must be edited before submission.

Parameters

  • boolean value: The required of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetRequired(true)

SetSize(text value)

This action sets the size attribute. The size specifies the character width of an input control if it is of type text, search, tel, url, email, or password.

Parameters

  • text value: The size of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetSize("50")

SetSpellcheck(boolean value)

Sets the Spellcheck attribute. Specifies wether spellcheck is on or off.

Parameters

  • boolean value: The current Spellcheck.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetSpellcheck(true)

SetStep(text value)

This action sets the step attribute. The step specifies the legal number intervals for the input control when it is of type number, range, date, datetime, datetime-local, month, time or week.

Parameters

  • text value: The step of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetStep("5")

SetStyle(text value)

Sets the Style attribute. Specifies inline css formatting for an element.

Parameters

  • text value: The current Style.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetStyle("color:orange")

SetTabIndex(text value)

Sets the TabIndex attribute. Specifies a tab order for elements.

Parameters

  • text value: The current TabIndex.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTabIndex("0")

SetTextDirection(text value)

Sets the TextDirection attribute. Specifies a direction for the text to be written. For example, "ltr" is left-to-right.

Parameters

  • text value: The current TextDirection.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTextDirection("rtl")

SetTitle(text value)

Sets the Title attribute. Specifies title information for the web element.

Parameters

  • text value: The current Title.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTitle("MyTitle")

SetType(text value)

This action sets the type attribute. The type attribute specifies the type of the input control. Acceptable values: button checkbox color date datetime datetime-local email file hidden image month number password radio range reset search submit tel text time url week

Parameters

  • text value: The type of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetType("button")

SetWidth(text value)

This action sets the width attribute. The width attribute specifies the width of an image input control.

Parameters

  • text value: The width of the input.

Example


use Libraries.Web.Page.Input
Input myInput
myInput:SetWidth("15")

ToText()

This action generates text for a particular web page. It is a helper action for Generate()

Return

text: This returns text in hypertext markup language (HTML) representing the tag.

Example

use Libraries.Web.Page.WebPage

WebPage page
text result = page:ToText()
//output out the web page
output result