You are here: Re: Trouble embedding ActiveX object in HTML using object tag « HTML « IT news, forums, messages
Re: Trouble embedding ActiveX object in HTML using object tag

Posted by Chris Lieb on 11/29/05 16:44

cwdjrxyz@yahoo.com wrote:
> Chris Lieb wrote:
> > Hi,
> >
> > I am trying to embed an ActiveX control that handles barcode scanner
> > input in a HTML page. It works fine on the computer that I developed
> > the control on since VB automatically registers ActiveX controls when
> > it builds them. However, when I try to open the page on another
> > computer, instead of the control, I get a standard IE placeholder.
> > Here is the code that I am using:
> >
> > <object
> > name="barcodeTest"
> > classid="clsid:C9575896-B228-4B1C-A854-6B0DA7F9BFD9"
> > codebase="http://ilhodsvr02b6/development/phh5cjl/apps/inventory/activex/barcodegetter.cab"
> > standby="Loading..."
> > type="application/x-oleobject"
> > width="350"
> > height="25">
> > <param name="value" value="param" />
> > </object>
> >
> > The path in the codebase is correct because I tried copying and pasting
> > it into a browser and it tried to download it. I am assuming that the
> > CLSID is correct because the control displays properly on my
> > development machine. I tried setting the codebase to point to the OCX
> > and also appending a #version=1,0,0,0 to both the CAB and OCX paths
> > (the file is version 1.0.0.0), but this caused no change.
> >
> > Does anyone know what is going on? This is really bugging me since it
> > looks like everything is correct and inline with many examples that I
> > have found on the web.

> I am not certain what is going on, from what you gave. Is it possible
> that ActiveX is turned off for the second computer?

For the computers on our intranet, IE is set to allow all ActiveX
controls.

> If I remember correctly, when you upgraded to SP2, ActiveX and some other hacker
> favorites had to be enabled if you wanted the browser to use them. Your
> wording seems to indicate that the second computer is using an IE
> browser which should handle AX. However most other browsers will not
> handle ActiveX at all or require a special plugin to do so.

All of the computers that this will run on are Win2k Pro SP4 machines
with IE6 SP1 installed. All of the machines are produced from the same
corporate build, so if it works on my machine, it should work on all of
them.

> I have no experience with barcodes. However, in many other cases where an ActiveX
> object is used, an ordinary object can be found that will do the same thing.

All my ActiveX control had to do was read the character data that the
scanner sent through the serial or keyboard PS/2 port. All of the
barcode recognition is handled within the scanner. As far as I know,
only ActiveX can read data straight out of a COM port, so that is the
route that I have been inclined to take. The only other possibility
that I can think of is client-side Java, but I assume that since it is
running in a sandbox it cannot access the COM ports. (That, and I
know how to easily handle the task in VB6, but I have never done
anything of the sort in Java.)

> If not, many include an embed within the AX object for browsers
> that will not handle AX. This approach is bad html, but it seems to
> work for many browsers that can not handle AX.

I won't have to support any browsers other than IE6, so my use of
ActiveX should not cause any problems. From what I see on the web and
have experienced, using the object tag should work just as well as
using the embed tag in IE6, so I would prefer to use the standards
compliant way if at all possible.

Chris Lieb

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация