Appxweb Meta
Home > Developer > Scripting

Scripting

Meta defines three scripting objects AM_data, AM_view and AM_function to work with the respective data, view and function Objects. These scripting objects can be used within script code included as part of the web page resource or declared as part of script function Meta Object. Any ActiveScript compatible scripting language can be used. Furthermore the Internet Explorer document object model (DOM) can be accessed using the AM_browser scripting object. The methods and properties of these scripting objects are described below.

Data Scripting Object: AM_data

Object Name
AM_data
Description
Scripting object used to work with the data Objects.
Properties
Scalar data Meta Object values are able to be accessed directly as properties using the Meta Object identifier.
Methods
getValueReturns the value of a scalar data object or item within an array data object.
setValueSets the value of a scalar data object or item within an array data object. If the data object has not previously been declared, it will be created as scalar data object with volitile state.
getPointerReturns the value of the scalar data object pointed to by the pointer data object.
setPointerSets the value of the scalar data object pointed to by the pointer data object.
getDimsReturns the dimensions of an array data object.
getRowsReturns the number of rows of an array data object.
getColsReturns the number of columns of an array data object.
lockObjectLock a data object, preventing it from being modified without the access key.
unlockObjectUnlock a previously locked data object, allowing it to be modified.
keyReturns the access key associated with a locked data object.
setLockedValueSets the value of a locked scalar data object or item within a locked array data object.
setLockedPointerSets the value of the data object pointed to by the locked pointer data object.

top

View Scripting Object: AM_view

Object Name
AM_view
Description
Scripting object used to work with the view Objects.

Methods
isDlgOpenRetrieves the boolean value indicating whether a dialog is open.
isDlgActiveRetrieves the boolean value indicating whether a modeless dialog has the active focus.
minimizeDlgMinimizes the dialog.
maximizeDlgMaximizes the dialog.
restoreDlgRestores a previously minimized dialog to its original size and position.
openfileDlgOpens the systems default file dialog.
folderDlgOpens the systems default folder dialog.
inputDlgOpens an input dialog.
textDlgOpens a text area input dialog.
msgDlgOpens a message dialog box.
addStyleCreates a new style element with the specified CSS and inserts it into the head element the current web page html.

top

Function Scripting Object: AM_function

Object Name
AM_function
Description
Scripting object used to work with the function Objects. Example:

AM_function.run("fid_showwindow");

Methods
runExecutes the specified function object.
waitCauses the execution of code within the script host to Wait for a set time period.

top

Internet Explorer Scripting Object: AM_browser

Object Name
AM_browser
Description
Scripting object used within script function Objects to access the Internet Explorer document object model.

Example
This example shows how to access Internet Explorer from within a scipt function Meta Object.
cookie = AM_browser.document.cookie;

top