Script example: Replacing an applet

This example displays a sheet applet with a range named TotalRevenue and a chart applet that listens for the range name over the InfoBus and charts the range. Both applets are contained in a single AppletContainer with an InfoCenter. The sheet gets its data from an external file named salesbymonth.html.

The HTML page contains two buttons (labeled "2D Chart" and "3D Chart") with each of which is associated a JavaScript function (makeChartFlat() and replaceChart(), respectively). Note: replaceChart() requires the presence of the file mypbag.pbg in the directory from which the applet is being run in order to execute properly.


To view the full source for this example, right-click in the example frame and click View Source.