This page demonstrates some JavaScript components which use standard HTML widgets but provide an interface which makes them easily scriptable and connectable using tools like Visual JavaScript.
The first group shows JavaScript Select List and the JavaScript Radio Group components. These have nearly identical properties events and methods, and implement a bound "value" property. The methods getValue() and setValue() are used to access this property. Whenever this value property changes an onChange() handler is called. This enables users of tools like Visual JavaScript to easily create "property connections" to other components.
Note that the layout of the buttons can be customized because the TextOptions fields can hold html (separated with ';' characters which can be "escaped"). The pick list is a "drop box" if its "Box Size" property is set to 1, otherwise it is a "select box" of the specified size.
Both the controls' values are passed on the URL on a form submission. Each must appear within an HTML form. By specifying NEEDSFORM in their JSB_DESCRIPTOR, they tell tools such as Visual JavaScript to ensure that a form is created (if necessary) when they are first dropped on a page.
The other JavaScript widget is the JavaScript Check Box. It also implements a bound property called value, accessible using the setValue() and getValue() methods. Below it is shown connected to a normal HTML text widget: