Introduction

 

Using Flipper Graph Control over the Internet


Licensing on the Internet or an Intranet is very easy when you use Flipper Graph Control. We have a signed .cab file available, multiple examples for use with VBScript or JavaScript, and an .lpk Internet licensing file for licensing the control in a browser. This article deals with how to add the control to an .html page through the <OBJECT> tag and how to correctly license and install the control.

 

Add Flipper Graph Control to a Web Page

 

First, you need to reference the Flipper Graph Control within an <OBJECT> tag on a web page. Here's an example of a full, working object tag:

<OBJECT id="flp" name="flp"
classid="clsid:00A167E4-27DC-11CF-867B-004095222F78"
align="baseline" border="0" width="400" height="300">
<param name="_Version" value="65539"><param name="_ExtentX" value="7938">
<param name="_ExtentY" value="5292"><param name="_StockProps" value="33">
</OBJECT>


Next, you need to add some code to display a graph that you would like to see.

<SCRIPT language="VBScript"><!--

    flp.DataInit = 3      '3 Columns of data.
    flp.GraphType = 0      'XYY Graph

    flp.DataValue(1, 0) = 1
    flp.DataValue(2, 0) = 2
    flp.DataValue(3, 0) = 3
    flp.DataValue(4, 0) = 4
    flp.DataValue(1, 1) = 10
    flp.DataValue(2, 1) = 50
    flp.DataValue(3, 1) = 35
    flp.DataValue(4, 1) = 72
    flp.DataValue(1, 2) = 30
    flp.DataValue(2, 2) = 10
    flp.DataValue(3, 2) = 42
    flp.DataValue(4, 2) = 28
    
    flp.Column = 0      'Make column 0, the current column
    flp.ColumnAxis = 0      'Make current column the x axis.

    flp.Column = 1      'Make column 1, the current column
    flp.ColumnAxis = 1      'Make current column the y1 axis
    flp.ColumnType = 1
    flp.ColumnStyle = 1      'Point shape circle.
    flp.ColumnMarkSize = 2      'Size of point in pixels
    flp.ColumnLegend = "Line 1"
    flp.ColumnColor = vbRed      'Make points red

    flp.Column = 2      'Make column 1, the current column
    flp.ColumnAxis = 1      'Make current column the y1 axis
    flp.ColumnType = 3
    flp.ColumnStyle = 1      'Point shape circle.
    flp.ColumnLegend = "Line 2"
    flp.ColumnColor = vbBlue 'Make points blue

    flp.Axis = 0
    flp.AxisTitle = "Time of Event"
    flp.AxisGrid = True
    flp.AxisGridPattern = 1
    flp.AxisGridColor = RGB(128,128,128)

    flp.Axis = 1
    flp.AxisTitle = "Delay"
    flp.AxisGrid = True
    flp.AxisGridPattern = 1
    flp.AxisGridColor = RGB(128,128,128)

    flp.GraphTitle = "Tests"

--></SCRIPT>


Now view the web page and verify that an XY graph containing a bar series and a line series appears.

 

Setting up an Automatically Downloading Flipper Graph Control

 

Before you can setup the Flipper Graph Control for it's final use on the Internet, you must first request the Internet Distribution Kit from ProWorks LLC. Simply e-mail support@proworks.com to receive an e-mail from a support representative with the .cab, .lpk, and example .html files you need. Once you receive this information you can modify your web pages as shown below:

 

First, you need to set the codebase parameter in the Flipper Graph Control <OBJECT> declaration to the location of the .cab file on your machine/server. See below for an example.

<OBJECT id="flp" name="flp"
classid="clsid:00A167E4-27DC-11CF-867B-004095222F78"
codebase="http://www.yourhost.com/flpgrf_i.cab"
align="baseline" border="0" width="300" height="200">
<param name="_Version" value="65539">
<param name="_ExtentX" value="7938">
<param name="_ExtentY" value="5292">
<param name="_StockProps" value="33">
</OBJECT>

 

Next, the LPK licensing <OBJECT> must be added to the web page. The code should be placed before any other <OBJECT> tags at the top of your HTML page. The flpgrf.lpk file it references must be in the same directory as the HTML file you are placing the LPK licensing into. Here's an example:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<PARAM NAME="LPKPath" VALUE="flpgrf.lpk">
</OBJECT>
 

 

One very important note, all ActiveX controls on a page that require licensing need to be packaged in the same LPK file. So if you have other controls on the page then you will need to create a new LPK file with a tool called LPK_TOOL that ProWorks can e-mail you as well.

 

To test this new web page make sure all existing flpgrf.ocx controls are unregistered. This can be done with the regsvr32 utility. For example, go to Start, Run... and enter 'regsvr32 "C:\Windows\Flipper\flpgrf.ocx" and the control referenced will be registered. To unregister a control simply add a -u switch to the above example.

 

To proceed to the tutorial, please click here.

 

 

Last modified on: Friday, August 16, 2002