Show TOC

Function documentationWeb Page Scripting Locate this document in the navigation structure

 

You can use Web page or browser-based scripting, using JavaScript, to dynamically control the behavior and appearance of SAP Manufacturing Integration and Intelligence (SAP MII) applets. You can use scripting to do the following:

  • Change applet properties

  • Call applet methods

  • Use applet events, such as user selections, to link applets for drill-down or data correlation applications

Features

To manipulate an object on a Web page, you can assign it a unique name using the NAME attribute of the APPLET HTML tag. Microsoft Internet Explorer and Netscape Navigator provide an object model in which an applet can be accessed using document.<appletName>, where appletName is the value of the NAME applet parameter.

The following HTML snippet shows the use of the NAME and MAYSCRIPT attributes.

<APPLET NAME="FillerPerformanceChart" CODEBASE="/XMII/Classes" CODE="iChart"

ARCHIVE="illum8.zip" WIDTH="800" HEIGHT="400" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="FillingArea/SampleQuery">

<PARAM NAME="DisplayTemplate" VALUE="FillingArea/SampleChart">

<PARAM NAME="SelectionEvent" VALUE="FillerParameterClicked">

</APPLET>

Note Note

When writing script and referring to Web page objects, remember that JavaScript is case-sensitive.

End of the note.

Example

  • To change the filter expression of a SQLQuery included in an iChart named QualityChart, use the following syntax:

    document.QualityChart.getQueryObject().setFilterExpr("SampleID = 'pHReading'");

  • To change the value in column four of the selected row in an iGrid named ActiveBatchGrid, use the following syntax:

    selectedBatch = document.ActiveBatchGrid.getGridObject().getSelectedCellValue(4);

See also:

Applet Properties

Applet Methods

Applet Methods for Web Page Scripting