.jsb
files, which can be found in the netscape/peas
directory of your Visual JavaScript installation. In addition to the information given here, you can refer to each component's source file for complete details of implementation. For information about the structure of a .jsb
file, see Netscape Component Developer's Guide.JavaScript components differ from Java components in that you can specify property values as JavaScript expressions. Note that when an application uses client-side JavaScript components, the runtime environment must include a JavaScript-enabled browser. Components are presented below alphabetically. The properties are listed alphabetically by the display name under which they are appear in the Inspector. These differ from the actual property names that are used to access property values in code. These are the built-in JavaScript components:
Cursor
property to a server-side cursor component on the same page. (Because the Connection Builder makes only client-side connections, you cannot use it connect the Custom Server Table component to a cursor.) The properties specify the visual appearance of the table. The contents of the table are automatically generated from the cursor's dataset.
If you specify Enable Sort Selection?
as true
, the component also runs client-side JavaScript.
The component has no events and no methods.
A descriptive source file for this component is install dir
/netscape/peas/CustomTable.jsb
Database Form Handler
The Database Form Handler is a server-side JavaScript component that processes a form submission and inserts, updates, or deletes a row in a database table. The component does not appear visually in the end-user interface.
The component can be configured to run JavaScript code on the client, the server, or both in response to the success or failure of the submission.
You can put this component on a page by itself, or with explanatory text and/or other server-side processing components such as Send Mail from Server. The Form component to be submitted should have the URL of this page in its Action
property, and its Method
property should be GET
.
The component has no events and no methods.
A descriptive source file for this component is install dir
/netscape/peas/FormAccept.jsb
Properties
Database Select List
The Database Select List is a server-side JavaScript multiple-choice selection list form element. The contents are generated automatically from data. A connection is established through the specified LiveWire DBPool component. A query is automatically generated from the Table
and Filter Column
specifications. Property values determine how the data values are retrieved and displayed. Each row of the result set is displayed as a selection option. You can specify column headings, determine how values are displayed and returned, and sort the result set.
This component has a client-side part that supports property and event connections. Use the getValue
method to retrieve the selected option, and setValue
to select an option programmatically.
A descriptive source file for this component is install dir
/netscape/peas/DBSelect.jsb
Properties
Date Display
The Date Display is a client-side JavaScript component that displays the current date or date on which the document was last modified. Property values determine the format of the display.
The component has no events and no methods.
A descriptive source file for this component is install dirinstall dir
/netscape/peas/DateDisplay.jsb
Properties
JavaScript Check Box
The JavaScript Check Box is a client-side JavaScript component that generates a labeled check box form element. It supports property and event connections.
Use the getValue
method to retrieve the selection state, and the setValue
method to change the selection state programmatically.
A descriptive source file for this component is install dir
/netscape/peas/CheckBox.jsb
Properties
JavaScript Client Cursor
The JavaScript Client Cursor is a JavaScript database cursor component that runs on both the server and the client. The cursor component creates a LiveWire database cursor based on the query specified in the SQL Query
property and constructs a buffer for the result set in client JavaScript. You can connect HTML form elements to the cursor to display values and call the component's methods, which can scroll through the result set and modify the database. See Writing Server-Side JavaScript Applications for more information on cursors.
The cursor must connect to a LiveWire DBPool component in the same project.
The JavaScript Client Cursor component supports direct connections and property connections. Property change events occur in response to changes in bound properties. In this component, bound properties include dynamically added properties that correspond to database columns.
A descriptive source file for this component is install dir
/netscape/peas/JSBufferedCursor.jsb
Properties
JavaScript Radio Group
The JavaScript Radio Group is a client-side JavaScript component that generates a radio button group form element. It supports property and event connections.
Use the getValue
method to retrieve the selected option, and the setValue
method to select an option programmatically.
A descriptive source file for this component is install dir
/netscape/peas/RadioGroup.jsb
Properties
JavaScript Select List
The JavaScript Select List is a JavaScript component, with both server- and client-side parts, that generates a multiple-choice Select List form element. In contrast to the Database Select List component, it has a fixed set of options, specified in the Text Options
property. The selected option's value, as specified in the Value Options
property, is submitted with the containing form.
This component supports property and event connections. Use the getValue
method to retrieve the selected option, and setValue
to select an option programmatically.
A descriptive source file for this component is install dir
/netscape/peas/SelectBox.jsb
Properties
JS Dummy Cursor
The JS Dummy Cursor is a sample client-side JavaScript component, intended for demonstration and testing purposes. The component is the equivalent of the client part of a JavaScript Client Cursor, with "dummy" data to mimic the behavior of a cursor without requiring a server or a database connection.
The JS Dummy Cursor component supports direct connections and property connections. Property change events occur in response to changes in bound properties. In this component, bound properties include SQL Query
, Current Row Number
, and dynamically added properties that correspond to database columns.
A descriptive source file for this component is install dir
/netscape/peas/DummyCursor.jsb
Properties
LiveWire Cursor
The LiveWire Cursor is a server-side JavaScript component that creates a LiveWire database cursor based on the query defined in the SQL Query
property. It has methods for scrolling through the result set and for modifying the database. See Writing Server-Side JavaScript Applications for more information on LiveWire cursors.
Because the Connection Builder makes only client-side connections, you cannot use it to connect this server-side cursor to a table or form. You can connect a LiveWire Cursor component to a Custom Server Table component by referring to it in the Custom Server Table's Cursor
property.
The component has no events.
A descriptive source file for this component is install dir
/netscape/peas/Cursor.jsb
Properties
LiveWire DBPool
The LiveWire DBPool is a server-side JavaScript component that establishes a database connection. It represents a pool of connections to a particular database configuration. Multiple components can use the same connection by referring to the same LiveWire DBPool object in their DBPool
properties.
This is a component wrapper for the LiveWire DBPool object. See Writing Server-Side JavaScript Applications for more information.
The component has no events.
A descriptive source file for this component is install dir
/netscape/peas/DBPool.jsb
Properties
Mail-to Link
The Mail-to Link is a client-side JavaScript HTML link component that creates a link used for sending messages. When clicked, this link displays the mail composition window. You can set the properties to values that will be automatically filled in as defaults for the mail message. Note that the message is not actually sent until the user clicks Send in the mail window.
The component has no events and no methods.
A descriptive source file for this component is install dir
/netscape/peas/MailToLink.jsb
Properties
Scrolling Message
The Scrolling Message is a client-side JavaScript component that displays a scrolling message in the Navigator status bar (at the bottom of the window) when its scroll
method is called.
The component has no events.
A descriptive source file for this component is install dir
/netscape/peas/ScrollingBanner.jsb
Properties
Server Label
The Server Label is a server-side JavaScript component for displaying a single item of information, for example, the value of a database field or the results of an aggregate function in an SQL query, such as a sum, maximum, or minimum. The properties determine the format for the text.
The component has no events and no methods.
A descriptive source file for this component is install dir
/netscape/peas/Label.jsb
Properties
Server Send Mail
The Server Send Mail is a server-side JavaScript component that creates a mail message on the server and sends it. This component is not visible in the end-user interface.
You can put this component on a page by itself (or with explanatory text). When you set the Send Now?
property to true
, the message is sent as soon as the page is loaded. Alternatively, you can put the component on the same page as the calling component, and when any conditions are met, call the send
method to send the message.
The From Address
and To Address
properties must be set for the message to be sent successfully.
The component has no events.
A descriptive source file for this component is install dir
/netscape/peas/SendMail.jsb
Properties
Simple Server Table
The Simple Server Table is a server-side JavaScript component that creates an HTML table. The table automatically displays data retrieved by the specified SQL Query
, through the specified LiveWire DBPool component. The data is only displayed. You cannot use this component to update data in the database.
Because the Connection Builder makes only client-side connections, you cannot connect the Simple Server Table component directly to a cursor component. The data is obtained through the referenced LiveWire DBPool component using the SQL select
statement specified in the component's SQL Query
property.
The component has no events and no methods.
A descriptive source file for this component is install dir
/netscape/peas/SimpleTable.jsb
Properties
Validated Form
The Validated Form is a client-side JavaScript component that generates an HTML form which can contain Validated Text Fields. The values in the Validated Text Fields are validated when the user submits the form. Validated Text Fields must be on a Validated Form for validation to occur.
This is a Palette component that consists of an HTML form with an event script added. The properties and events are the same as those for the standard HTML Form component. The onSubmit
event automatically has one connection to a script that checks the validity of field values when the form is submitted. The script checks that each field in the form has a valid value and that each required field has a non-null value.
A descriptive source file for this component is install dir
/palettes/ValidatedForm_pe.html
Properties
Validated Form | |
---|---|
Event | Description |
onReset | Occurs just before the elements of the form are reset. |
onSubmit | Occurs just before the form is submitted. |
Validated Text Field
The Validated Text Field is a client-side JavaScript text field element in a Validated Form component. The value of the text field is validated according to the specified criteria. Validation can occur when the field value changes, or when the form is submitted, or at both times.
A descriptive source file for this component is install dir
/netscape/peas/ValidatedText.jsb
Properties
Last Updated: 11/19/97 12:45:30