com.gargoylesoftware.htmlunit.javascript.host
Class HTMLFormElement

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
              extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
                  extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLFormElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class HTMLFormElement
extends HTMLElement

A JavaScript object for a Form.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, Daniel Gredler, Kent Tong, Chris Erskine, Marc Guillemot, Ahmed Ashour
See Also:
MSDN documentation, Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLFormElement()
 Create an instance.
 
Method Summary
 java.lang.Object get(int index, org.mozilla.javascript.Scriptable start)
 Return the specified indexed property
 void jsConstructor()
 Javascript constructor.
 void jsxFunction_reset()
 Reset this form
 void jsxFunction_submit()
 Submit the form.
 java.lang.String jsxGet_action()
 Return the value of the javascript attribute "action".
 HTMLCollection jsxGet_elements()
 Return the value of the javascript attribute "elements".
 java.lang.String jsxGet_encoding()
 Return the value of the javascript attribute "encoding".
 int jsxGet_length()
 Return the value of the javascript attribute "length".
 java.lang.String jsxGet_method()
 Return the value of the javascript attribute "method".
 java.lang.String jsxGet_name()
 Return the value of the javascript attribute "name".
 java.lang.Object jsxGet_onsubmit()
 Get the onsubmit event handler for this element.
 java.lang.String jsxGet_target()
 Return the value of the javascript attribute "target".
 void jsxSet_action(java.lang.String action)
 Set the value of the javascript attribute "action".
 void jsxSet_encoding(java.lang.String encoding)
 Set the value of the javascript attribute "encoding".
 void jsxSet_method(java.lang.String method)
 Set the value of the javascript attribute "method".
 void jsxSet_name(java.lang.String name)
 Set the value of the javascript attribute "name".
 void jsxSet_onsubmit(java.lang.Object onsubmit)
 Set the onsubmit event handler for this element.
 void jsxSet_target(java.lang.String target)
 Set the value of the javascript attribute "target".
 void setHtmlElement(HtmlElement htmlElement)
 Set the html element that corresponds to this javascript object
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
addComponentRequest, clearComponentRequest, compareVersions, doComponentRequest, getAvailHeight, getAvailWidth, getBufferDepth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getHeight, getJavaEnabled, getPlatform, getSystemLanguage, getUserLanguage, getWidth, getWithFallback, isComponentInstalled, isHomePage, jsxFunction_addBehavior, jsxFunction_getAttribute, jsxFunction_getAttributeNode, jsxFunction_getBoundingClientRect, jsxFunction_getClientRects, jsxFunction_getElementsByTagName, jsxFunction_insertAdjacentElement, jsxFunction_insertAdjacentHTML, jsxFunction_removeAttribute, jsxFunction_removeBehavior, jsxFunction_scrollIntoView, jsxFunction_setAttribute, jsxFunction_setAttributeNode, jsxGet_all, jsxGet_children, jsxGet_className, jsxGet_currentStyle, jsxGet_disabled, jsxGet_id, jsxGet_innerHTML, jsxGet_innerText, jsxGet_localName, jsxGet_namespaceURI, jsxGet_offsetHeight, jsxGet_offsetLeft, jsxGet_offsetParent, jsxGet_offsetTop, jsxGet_offsetWidth, jsxGet_onblur, jsxGet_onclick, jsxGet_oncontextmenu, jsxGet_ondblclick, jsxGet_onfocus, jsxGet_onkeydown, jsxGet_onkeypress, jsxGet_onkeyup, jsxGet_onmousedown, jsxGet_onmousemove, jsxGet_onmouseout, jsxGet_onmouseover, jsxGet_onmouseup, jsxGet_onresize, jsxGet_outerHTML, jsxGet_ownerDocument, jsxGet_parentElement, jsxGet_prefix, jsxGet_runtimeStyle, jsxGet_scrollHeight, jsxGet_scrollLeft, jsxGet_scrollTop, jsxGet_scrollWidth, jsxGet_style, jsxGet_tagName, jsxGet_title, jsxSet_className, jsxSet_disabled, jsxSet_id, jsxSet_innerHTML, jsxSet_innerText, jsxSet_onblur, jsxSet_onclick, jsxSet_oncontextmenu, jsxSet_ondblclick, jsxSet_onfocus, jsxSet_onkeydown, jsxSet_onkeypress, jsxSet_onkeyup, jsxSet_onmousedown, jsxSet_onmousemove, jsxSet_onmouseout, jsxSet_onmouseover, jsxSet_onmouseup, jsxSet_onresize, jsxSet_outerHTML, jsxSet_scrollLeft, jsxSet_scrollTop, jsxSet_title, navigateHomePage, setDomNode, setHomePage, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

HTMLFormElement

public HTMLFormElement()
Create an instance. A default constructor is required for all javascript objects.

Method Detail

get

public java.lang.Object get(int index,
                            org.mozilla.javascript.Scriptable start)
Return the specified indexed property

Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject
Parameters:
index - The index of the property
start - The scriptable object that was originally queried for this property
Returns:
The property.

jsConstructor

public final void jsConstructor()
Javascript constructor. This must be declared in every javascript file because the rhino engine won't walk up the hierarchy looking for constructors.


jsxFunction_reset

public void jsxFunction_reset()
Reset this form


jsxFunction_submit

public void jsxFunction_submit()
                        throws java.io.IOException
Submit the form.

Throws:
java.io.IOException - if an io error occurs

jsxGet_action

public java.lang.String jsxGet_action()
Return the value of the javascript attribute "action".

Returns:
The value of this attribute.

jsxGet_elements

public HTMLCollection jsxGet_elements()
Return the value of the javascript attribute "elements".

Returns:
The value of this attribute.

jsxGet_encoding

public java.lang.String jsxGet_encoding()
Return the value of the javascript attribute "encoding".

Returns:
The value of this attribute.

jsxGet_length

public int jsxGet_length()
Return the value of the javascript attribute "length". Does not count input type=image elements as browsers (IE6, Mozilla 1.7) do (cf MSDN doc)

Returns:
The value of this attribute.

jsxGet_method

public java.lang.String jsxGet_method()
Return the value of the javascript attribute "method".

Returns:
The value of this attribute.

jsxGet_name

public java.lang.String jsxGet_name()
Return the value of the javascript attribute "name".

Returns:
The value of this attribute.

jsxGet_onsubmit

public java.lang.Object jsxGet_onsubmit()
Get the onsubmit event handler for this element.

Returns:
org.mozilla.javascript.Function

jsxGet_target

public java.lang.String jsxGet_target()
Return the value of the javascript attribute "target".

Returns:
The value of this attribute.

jsxSet_action

public void jsxSet_action(java.lang.String action)
Set the value of the javascript attribute "action".

Parameters:
action - The new value.

jsxSet_encoding

public void jsxSet_encoding(java.lang.String encoding)
Set the value of the javascript attribute "encoding".

Parameters:
encoding - The new value.

jsxSet_method

public void jsxSet_method(java.lang.String method)
Set the value of the javascript attribute "method".

Parameters:
method - The new value.

jsxSet_name

public void jsxSet_name(java.lang.String name)
Set the value of the javascript attribute "name".

Parameters:
name - The new value.

jsxSet_onsubmit

public void jsxSet_onsubmit(java.lang.Object onsubmit)
Set the onsubmit event handler for this element.

Parameters:
onsubmit - the new handler

jsxSet_target

public void jsxSet_target(java.lang.String target)
Set the value of the javascript attribute "target".

Parameters:
target - The new value.

setHtmlElement

public void setHtmlElement(HtmlElement htmlElement)
Set the html element that corresponds to this javascript object

Overrides:
setHtmlElement in class SimpleScriptable
Parameters:
htmlElement - The html element


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.