Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Hyperevents and DOM

The HTML Document Object Model (DOM) defines a platform and language neutral interface to the elements of an HTML document. Using the DOM, hyperevents and JavaScript can dynamically access and update the content, style, and structure of an HTML document.

The structure of the DOM is hierarchical. It defines a tree structure of elements within elements. Access a particular element by chaining references from the topmost element through the intermediate elements to the desired element. You can refer to HTML elements by name, the value of their name attributes, or by their positions in the various element arrays.

  • self.document — The top node in the tree. Begin reference chains here. Note that some browsers require “self” while others do not.

  • self.document.forms.MyForm — The form on the document named MyForm.

  • self.document.forms.MyForm.Field1 — The input field named Field1 on the form named MyForm.

  • self.document.forms.MyForm.Field1.value — The current value of the input field named Field1 on the form named MyForm.

Note:

For more information about the HTML DOM, read the HTML DOM TutorialOpens in a new tab on the W3 SchoolsOpens in a new tab Web site.

FeedbackOpens in a new tab