JavaScript support is very basic at present. The near-term goal is full JavaScript 1.1 support. Currently, we do not plan
to support browser-specific JavaScript. Please let us know via the mailing list your priorities for missing features.
Inline and included scripts are supported, as are the following DOM elements:
Window
properties
- closed - true if the window has been closed
- document - the associated Document object
- frames - an array of subframes of this window
- location - r/w the associated Location object, which may be treated as a URL string
- name - r/w the name of the window
- navigator - the Navigator object
- opener - r/o the window which opened this one (top-level frames only)
- parent - the window which is a parent of this one.
- self - the Window itself
- top - the top frame in the frameset containing this window
- window - a synonym for self
- - the subframe of this window with the specified name
events
- onLoad - invoked when the page is loaded
methods
- alert() - queues up an alert message, accessible via WebClient.getNextAlert() or popNextAlert()
- close() - closes the window
- confirm() - invokes a callback supplied via WebClient.setDialogResponder to return the user's response. By default,
the callback returns true. Users may change this by supplying an implementation of DialogResponder.
- prompt() - invokes a callback supplied via WebClient.setDialogResponder to return the user's response
- open() - opens a new window. A callback will be generated to any WebWindowListener registered with the client.
Navigator
properties
- appCodeName - the code name set in ClientProperties.setApplicationCodeName()
- appName - the name of the browser, as set in ClientProperties.setApplicationName()
- appVersion - the browser version, set in ClientProperties.setApplicationVersion()
- plugins - an empty array of objects, since plugins are not universally supported
- platform - the platform for the browser, set in ClientProperties.setPlatform (1.2 feature)
- userAgent - the name of the user agent, set by ClientProperties.setUserAgent or derived from the code name and version
methods
- javaEnabled - always returns false to indicate that applets are not supported
Screen (1.2 feature)
properties
- availWidth - the available screen width, set in ClientProperties.setAvailableScreenWidth()
- availHeight - the available screen height, set in ClientProperties.setAvailableScreenHeight()
methods
- javaEnabled - always returns false to indicate that applets are not supported
Location
properties
- href - r/w the current window location. Setting this value initiates a new request to the server
- host - r/o the host and port portion of the current window location
- hostname - r/o the host portion of the current window location
- port - r/o the port portion of the current window location
- protocol - r/o the port portion of the current window location
- pathname - r/w the path portion of the current window location. Setting this value initiates a new request to the server
- search - r/w the query portion of the current window location. Setting this value initiates a new request to the server
methods
- replace - replaces the current window by doing a new request to the server
Document
properties
- forms - an array of Form objects
- images - an array of Image objects
- links - an array of Link objects
- title - readonly. The title of the page
- location - a synonym for window.location
- cookie - access to the document-specific cookies.
- - the name of a form, image, or link
methods
- open - opens a document for writing, optionally specifying a MIME type
- close - closes the open document and replaces its contents with the written text
- getElementById - returns the element in the document with the specified ID
- getElementsByName - returns an array of all elements in the document with the specified name
- getElementsByTagName - returns an array of all elements in the document with the specified tag name
- write - writes a string to the contents of the current open document
- writeln - writes a line with carriage-return to the contents of the current open document
HTMLElement
properties
- title - r/o the title attribute of the element
- style - r/o the style attribute
- tagName - r/o the tag associated with the element
- nodeName - r/o the tag associated with the element (same as tagName)
Style
properties
- display - r/w browser-specific display control
- visibility - r/w browser-specific visibility control
Form (inherits from HTMLElement)
properties
- action - r/w the action associated with the form
- document - r/o the enclosing document
- elements - r/o an array of controls in the form
- action - r/w the target for any response from the form
- length - r/o the number of controls in the form
- - the name of a control in the form
events
- onReset - invoked when form.reset() is invoked or a reset button is clicked
- onSubmit - invoked when form.submit() is invoked or a submit button is clicked
methods
- submit - submits the form
- reset - resets the form controls to their default values
- getElementsByTagName - returns an array of all elements in the form with the specified tag name
Image
properties
- src - read/write - the relative URL of the image
- name - read-only - the name attribute of the image
Link (inherits from HTMLElement)
properties
- href - read/write - the URL associated with the link
events
- onClick - invoked when link.click() is invoked
- onMouseOver - invoked when link.mouseOver() is invoked
-
Input (inherits from HTMLElement)
properties
- form - read-only - the form containing the input
- name - read-only - the name of the control
- tabindex - read-only - the index of the control for tabbing
- type - read-only - the name of the type of control
- defaultValue - read-only - the value predefined for the control (text only)
methods
Button (inherits from Input)
events
- onClick - invoked when button.click() is called
Text (inherits from Input)
properties
- value - read/write - the current text value
- maxlength - read-only - the maximum number of characters which may be entered
events
- onChange - invoked when the value of the control is changed via form.setParameter
TextArea (inherits from Input)
properties
- value - read/write - the current text value
events
- onChange - invoked when the value of the control is changed via form.setParameter
Hidden (inherits from Input)
properties
- value - read/write - the current text value
Password (inherits from Input)
properties
- value - read/write - the current text value
events
- onChange - invoked when the value of the control is changed via form.setParameter
Checkbox (inherits from Input)
properties
- checked - read/write - the state of the checkbox
- defaultChecked - read-only - the default state of the checkbox
- value - read/write - the value transmitted if the control is checked
events
- onClick - invoked when the state of the control is changed via form.setParameter or form.removeParameter
Radio (inherits from Input)
properties
- checked - read/write - the state of the radio button
- defaultChecked - read-only - the default state of the radio button
- value - read/write - the value transmitted if the control is checked
events
- onClick - invoked when the state of the control is changed via form.setParameter
Select (inherits from Input)
properties
- length - read-only - the number of options associated with the control
- selectedIndex - read-write - the index of the selected option
- options - read-write - an array of the options associated with the control
- options.length - read-write - the number of options associated with the control
- value - read-write - the value of the selected option
events
- onChange - invoked when the value of the control is changed via form.setParameter
Option (inherits from Input)
constructor
You may construct an Option object and assign it to an element in the Select.options array
properties
- text - read-write - the display text associated with the option (listed after the <'option> tag)
- value - read-write - the value associated with the option (from the 'value' attribute)
- selected - read-write - true if this option is currently selected
- defaultSelected - read-only - true if this option is selected by default
- index - read-only - the index of this option in its select
Copyright © 2000-2008, Russell Gold
Hosted by