Creating an HTML Client Application with an ActiveX Component

This sample demonstrates how to create an HTML with an ActiveX component using JavaScript. This example uses the ITEInformationWindowEx (AttachTo3dWindow) and ITE3DWindowEx (CreateInstance) interfaces. ActiveX components can only be used in legacy Internet Explorer.

 

<html>

  <body onload = "Init();">

    <object id="TerraExplorer3DWindowEx" classid="CLSID:3A4F9196-65A8-11D5-85C1-0001023952C1" width="600" height="400"></object>

    <object id="TerraExplorerInformationWindowEx" classid="CLSID:3A4F919B-65A8-11D5-85C1-0001023952C1" width="300" height="400"></object>

 

    <script language="javascript" >

      function Init()

      {

      TerraExplorerInformationWindowEx.AttachTo3dWindow(TerraExplorer3DWindowEx);

      var sgworld = TerraExplorer3DWindowEx.CreateInstance("TerraExplorerX.SGWorld80");

     

sgworld.Project.Open("http://www.skylineglobe.com/SkylineGlobeLayers/SG_ExternalFlys/skylineglobe7.fly");

      }

    </script>

  </body>

 

</html>