Host Functions for Microsoft ASP
(Active Server Pages)
Version 3
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:
-
assigning or changing the displayed value in a component such as a textfield, textarea or textpane
-
selecting ("checking") or unselecting a checkbox
-
populating or clearing row and cell contents in a table
-
adding or selecting a specific value in a combobox
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.
-
appName - The name of the client app (without the ".xml" suffix) in which a
function is to be invoked. The app must already be open in the client session.
-
functionName - The internal name of the function to be invoked in the app.
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.
-
name - The internal name used in the client app for this object.
-
msg - A character string to be displayed as a message. Example: "Process completed" .
jsiFrameSetTitle(string name, string title)
This function is used to assign a frame's title
(displayed in the top border of the frame).
-
name - The internal name used in the client app for this object.
-
title - A character string to be displayed as the frame title. Example: "My Title".
jsiFrameSetVisible(string name, boolean bValue)
This function is used to make a frame visible or invisible (hidden).
-
name - The internal name used in the client app for this object.
-
bValue - A BOOLEAN value: True to make visible, False to hide.
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.
-
name - The internal name used in the client app for this object.
-
bValue - A boolean value for the selected state of the checkbox: True for selected,
False for not selected.
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.
-
name - The internal name used in the client app for this object.
-
value - A comma-separated list of one or more character strings to be displayed as
choices in the list. A choice cannot contain commas.
jsiComboboxRemoveAllItems(string name)
This function is used to remove all choices from (clear) a combobox.
-
name - The internal name used in the client app for this object.
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.
-
name - The internal name used in the client app for this object.
-
nValue - An integer value from 0 to (n - 1), where n is the current number of choices
in the combobox.
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.
-
name - The internal name used in the client app for this object.
-
value - A character string that must exactly match one of the current choices in
the combo box (case-sensitive).
Hyperlink
jsiHyperlinkSetText(string name, string value)
This function is used to assign the displayed value in a hyperlink.
-
name - The internal name used in the client app for this object.
-
value - The value to be displayed in the hyperlink.
jsiHyperlinkSetUserData(string name, string value)
This function is used to assign a value to the (hidden) userdata attribute
in a hyperlink.
-
name - The internal name used in the client app for this object.
-
value - The value to be assigned to the userdata attribute of the 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.
-
msg - A character string for a message to be displayed in the message box.
May contain newline characters (VBLF). Cannot contain the comma (",") character.
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.
-
msg - A character string for a message to be displayed in the message box.
May contain newline characters (VBLF). Cannot contain the comma (",") character.
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.
-
name - The internal name used in the client app for this object.
-
value - The value to be displayed in the passwordfield.
Table
jsiTableRemoveAllItems(name)
This function is used to
remove all rows from a table component in a client app.
-
name - The internal name used in the client app for this object.
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.
-
name - The internal name used in the client app for this object.
-
nRow - An integer row number of the specified cell, starting with 0 (zero)
for the top row.
-
nCol - An integer column number of the specified cell, starting with 0 (zero)
for the leftmost column.
-
value - The string value to be displayed in this cell.
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.
-
name - The internal name used in the client app for this object.
-
nRow - An integer row number, starting with 0 (zero) for the top row.
-
value - A set of string values, delimited by the specified delimiter character(s), that
will be displayed in the cells (columns) of the specified row.
-
delimiter - The string delimiter used to separate cell values in the "value" parameter.
Be careful to use a delimiter that will not be part of any data values. A caret (^) symbol
is often a good choice.
Textarea
jsiTextAreaSetText(string name, string value)
This function is used to display text within a text area.
-
name - The internal name used in the client app for this object.
-
value - The character string to be displayed within the text area. This value may
contain line feed characters, which will override the automatic word wrap feature of the
text area, to allow user-controlled text placement (as with a name/address display).
Textfield
jsiTextFieldSetText(string name, string value)
This function is used to display a value within a textfield.
-
name - The internal name used in the client app for this object.
-
value - The value to be displayed in the textfield.
Textpane
jsiTextPaneSetText(string name, string value)
This function is used to display a value within a textpane.
- name - The internal name used in the client app for this object.
-
value - The character string to be displayed within the textpane. This value may
contain line feed characters, which will override the automatic word wrap feature of the
textpane, to allow user-controlled text placement (as with a name/address display).
Up to Top
Return to Help Index