Host Functions for Microsoft ASP
(Active Server Pages)
Version 3
 
General Container Procedures Component Procedures
Introduction Generic Container Generic Component
Utility Procedures Frame Button
Checkbox
Combo box
Hyperlink
Label
Message Box
Passwordfield
Table
Textarea
Textfield
Textpane


Introduction

This document lists each of the VBScript functions that can be used by Microsoft ASP (Active Server Pages) to send various commands to a client application (app). These functions are contained in a "jsi.asp" file that can be included at the top of your ASP page with the command:
<!--#include file="jsi.asp"-->
There are commands available for a wide variety of purposes, including:
In addition, a powerful utility procedure allows a host procedure to indirectly use all scripting capabilities available in a client app, by running a client-side function that accomplishes the desired action(s).

These functions construct the commands that are to be sent to the client (known as CIO or Component Instruction Object commands). They are used like any other VBScript function. To actually send each command to the client, use the standard "Response.Write()" ASP statement.

For example, to display a literal into a client textfield whose object name is "tName":

Response.Write( jsiTextFieldSetText("tName", "Your Name Here") )
Most functions have at least one required argument, the "object name" which names a container or component object to which the procedure will be applied. These names are case-sensitive, meaning that upper and lower case must exactly match the name used in Jargon Writer for this object. This means that 'TName' and 'tName' cannot be used interchangeably to reference the same client object. This rule is different than the syntax used in VBScript itself, and can be the cause of numerous errors if not carefully followed.

Utility Procedures

jsiInvokeFunction(string appName, string functionName)

This function is used to instruct the client to execute an existing function in a specific app. The function can contain any valid list of statements, and is executed just as if it were linked to a client event which had just taken place. This function may also be called using the aliases "jsiInvokeTaskList" or "jsiInvokeFn" with the same results.

Container Procedures

These functions are used with various container objects (frames, panels). There are both generic container functions which can be used with any container type, and other functions that are specific to a particular container type.

Generic Container
These functions can be used on any container object (frame, panel, cardpanel, tabpanel).

No Generic Container methods are currently available in Version 3.

Frame

jsiFrameSetMessage(string name, string msg)
This function is used to display a message in the system message area at the bottom of the frame.

jsiFrameSetTitle(string name, string title)
This function is used to assign a frame's title (displayed in the top border of the frame).


jsiFrameSetVisible(string name, boolean bValue)
This function is used to make a frame visible or invisible (hidden).

Component Procedures

These functions are used with various component objects (objects which are not containers). There are both generic component functions which can be used with any component type, and other functions that are specific to a particular component type.

Generic Component
These functions can be used on any component object.

No Generic Component methods are currently available in Version 3.

Button

No Button methods are currently available in Version 3.

Checkbox

jsiCheckboxSetSelected (string name, boolean bValue)
This function is used to select (check) or unselect (clear) a checkbox.


Combobox

jsiComboboxAddItem(string name, string value)
This function is used to add one or more values to the combobox choices. Values are always added at the bottom of the list of choices.


jsiComboboxRemoveAllItems(string name)
This function is used to remove all choices from (clear) a combobox.


jsiComboboxSetSelectedIndex(string name, int nValue)
This function is used to set the currently selected item to the n'th item in the list, starting with 0 as the top item.


jsiComboboxSetSelectedItem(string name, string value)
This function is used to set the currently selected item by specifying the exact value of one of the choices. String must exactly match, including upper/lower case and any trailing spaces.

Hyperlink jsiHyperlinkSetText(string name, string value)
This function is used to assign the displayed value in a hyperlink.


jsiHyperlinkSetUserData(string name, string value)
This function is used to assign a value to the (hidden) userdata attribute in a hyperlink.


Label

No Label methods are currently available in Version 3.

Message Box

jsiMsg(string msg)
This function is used to display an informational message to the user, in a modal dialog box with an OK button.


jsiWarn(string msg)
This function is used to display an error or warning message to the user, in a modal dialog box with an OK button.

Passwordfield jsiPasswordFieldSetText(string name, string value)
This function is used to display a value within a passwordfield. The actual characters will not be shown (except on PalmOS), instead they will be displayed as asterisks to keep the value secret.

Table jsiTableRemoveAllItems(name)
This function is used to remove all rows from a table component in a client app.


jsiTableSetText (string name, int nRow, int nCol, string value)
This function is used to assign or change the contents of one cell in a table. This function may also be called using the alias "jsiTableSetCellData" with the same results.


jsiTableSetRowText (string name, int nRow, string value, string delimiter)
This function is used to assign or change the contents of all cells in one row in a table. This method is more efficient than using jsiTableSetText to set each cell in the row separately.

Textarea jsiTextAreaSetText(string name, string value)
This function is used to display text within a text area.

Textfield jsiTextFieldSetText(string name, string value)
This function is used to display a value within a textfield.

Textpane jsiTextPaneSetText(string name, string value)
This function is used to display a value within a textpane.


 Up to Top      Return to Help Index