views:

80

answers:

2

We have a webpage that works fine on the local computer as it uses a COM Object that is only available in the local computer.

the program generates HTML code:

<html>
  <head>
     <script type="text/javascript">
     <!--
       function ResizeControl(){Y = document.body.clientHeight;if (Y < 1) {Y = 1}X = document.body.clientWidth;if (X < 1) {X = 1}ActiveX.width = X;ActiveX.height = Y}
     -->
     </script>
     <style type="text/css">html, body { overflow:hidden; } </style>
  </head>
  <body OnResize="ResizeControl()" OnLoad="ResizeControl()" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
     <object id="ActiveX" classid="CLSID:8EC68701-329D-4567-BCB5-9EE4BA43D358" width="14" height="14">
         <PARAM NAME="tabName" VALUE="Complaints">
     </object>
  </body>
</html>

and shows fine

alt text

My question is, How can we port this into a web environment? As the Delphi developer has no idea and I'm not a Delphi fellow.

I want to be able to use this "webpage" on a web address

http://INTRANET/mysite/thispage.html

Any idea, any though, any door to open is greatly appreciate :)

A: 

I see two options:

  1. Write ISAPI dll that internally calls COM object and returns the result. Use Apache for ISAPI host.
  2. Write standalone simple HTTP server. With Indy it can be done like a breeze. Do the same as with ISAPI. Just call COM and return the HTML.

This also ensures security because COM is not directly exposed to the internet. It is only accessible through the proxy.

Runner
it's an idea ... Let us try that :) ty
balexandre
+2  A: 

You should deploy the ActiveX control on your web server and provide the URL to the .cab file in the HTML page in the codebase attribute of the object element so users can download and install the ActiveX component through a standard dialog in Internet Explorer.

TOndrej
ActiveX controls are not accepted with open hands these days. At least not by me :) This is why I proposed an additional layer. As it seems the ActiveX already makes HTML on its own. But your solutin is perfectly valid, don't get me wrong :) It just a matter of preference.
Runner
And you are limited to IE this way.
Runner
IE is always the problem, but it's a Business Application, and we cover 90% of our clients this way (witch is depressing as I'm a web developer) :-/
balexandre
Ah I overlooked that it is an intranet not internet solution. Then IE might be a viable choice if the company has it as an official browser.
Runner