The whole mechanism is run by the underlying JavaScript code. The compiler converts all predicate interfaces, constants to hidden fields. These hidden fields are different from those that are part of the original HTML form design (price value in a Purchase Order form). This gives a clean and uniform way of handling various interfaces and constants described by a form designer.
All named form fields, except fields that are read-only, that form a part of the relationship are given an onchange event handler. The onchange event triggers the algorithm to compute a new fixed-point every time a field is modified. Fields that have been specified as read-only are given handlers as follows:
If field validation formats are specified, then relevant fields are given a onkeyup handler and the textual fields are annotated with traffic lights to reflect the validity of the value entered so far.
A call to JavaScript function name foo with a list of arguments specified in the specifications is implemented as follows:
It is assumed that the function foo is a predefined function in the library that is included at run-time. In our case, foo represents addition of two numbers as shown below:
The underlying engine relies heavily on a core library of basic algebraic, array manipulation, DOM manipulation and boolean expression tree traversal 3 routines and consists of over 3000 lines of JavaScript code. We have provided a set of predefined functions which occur routinely in the relationship descriptions and there is a provision to support user-defined libraries.
The mechanism has two modes: auto-completion and auto-update mode. The mechanism works in auto-completion mode if the user assigns values to empty fields and does not update any of the non-empty fields whereas the mechanism works in auto-update mode when a user changes the value of a non-empty field. This causes deduced field values to be retracted and new field values are then computed on the basis of the updated field value.
We have tested our implementation on Explorer on Unix and Windows, Netscape on Unix and Windows and IE on Macintosh.