Using the ActiveX Control on a Web Page

This web page contains a Reflection for IBM ActiveX Control. When the page is loaded, GetActiveSession is used to create a Reflection Session object. This object is used to configure a 5250 session. Commented out code shows how you could accomplish the same thing with the control's Command method. A button on the page uses the Command method to display the Session Setup dialog box. Commented out code shows how you could accomplish the same thing with GetActiveSession. (Click here to see a list of other dialog box commands used by Reflection.)

<HTML>

 

<HEAD>

<TITLE>Reflection ActiveX Control Demonstration Page</TITLE>

</HEAD>

 

<BODY>

<H2>Reflection for IBM ActiveX Demo </H2>

 

<DIV>

<input type = "submit"

value="Session Setup"

onclick="SessionSetup()">

</DIV>

 

<BR>

 

<OBJECT ID ="RibmCtrl"

 CLASSID="clsid:7D3AFC5D-6CFF-4E1F-9C41-033422F85734"

 WIDTH=380

 HEIGHT=280>

</OBJECT>

 

<SCRIPT LANGUAGE="VBScript">

<!--

 

Dim Ribm 'Reflection object assigned to the active session

 

'Define Reflection contstants used by the Reflection Session object

const rc5250Terminal = 3

const rc31792 = 31

const rcTelnet = 1

 

Sub Window_OnLoad() 

 

'Set the Reflection session type

 

'Technique #1: Create a Reflection Session Object

Set Ribm = RibmCtrl.GetActiveSession

Ribm.SetupSession rc5250Terminal, rc31792, rcTelnet

 

'Technique #2: Use the control's Command method

'RibmCtrl.Command ".SetupSession rc5250Terminal, rc31792, rcTelnet"

 

End Sub

 

Sub SessionSetup()

 

'Display the SessionSetup dialog box.

RibmCtrl.Command ".SessionSetupDlg"

 

'Alternative syntax to do this using the Reflection object

'Set Ribm = RibmCtrl.GetActiveSession

'Ribm.SessionSetupDlg

 

End Sub

-->

</SCRIPT>

 

</BODY>

</HTML>