Home
SEARCH

 

Creating Bar Codes on Web Pages - Client Side Overview


Adding bar codes to web pages using the TALtech Bar Code ActiveX control is extremely easy when all web clients are running Windows and Internet Explorer 4.0 or above. Internet Explorer under Windows fully supports ActiveX controls and will even automatically download and install the ActiveX control from your web server the first time a client visits a page containing a reference to the ActiveX control. Once the control has been installed on the clients PC, it does not need to be downloaded or installed again if the user visits other web pages that contain references to the control. The steps for adding client side ActiveX bar codes are as follows:

  1. Copy the Internet CAB file containing the redistributable version of the TALtech Bar Code ActiveX control to a folder on your web server. The server can be any type of system including UNIX, Linux, Windows, etc. The TALtech Bar Code ActiveX Control is provided with the necessary CAB file (approximately 500Kb) so that all you need to do is copy the supplied CAB file your server.

  2. Add Object tags to your HTML documents that reference the control.
    The following sample object tags show how to insert a TALtech Bar Code Object into an HTML document. The first object points to a LPK (license) file that must be installed on the users system in their Windows folder. The TALtech Bar Code ActiveX Control will not be scriptable in Internet Explorer without this file installed. The LPK file is installed automatically from the Internet CAB file and the Setup program that comes with the TALtech Bar Code ActiveX Control. The second object tag below is for the actual control. The name of the control is set using the ID="controlname" setting and the CODEBASE tag points to a web URL or a file path where the setup program for the control can be found if the control is not currently installed on the user's system. If the control is not installed then the client's browser will automatically download the control from the specified URL and install it. The TALtech Bar Code ActiveX Control comes complete with a fully code signed CAB file (signed with Verisign's Authenticode technology) so that all you need to do is copy the supplied CAB file to a folder on your web server.
    Note: The URL in the CODEBASE tag should reference the CAB file on your web server.

    To place a TALtech Bar Code ActiveX Control in a HTML document you simply add the following object tags to your document where you want a bar code to appear.

     

    <object CLASSID="CLSID:5220cb21-c88d-11cf-b347-00aa00a28331">
    <param name="LPKPath" value="Talbc.lpk"></object>
    <object ID="TALBarCd1" CLASSID="CLSID:C917E12F-9757-11D2-85DB-F01851C10000"
    CODEBASE="http://www.YourWebServer.com/talbcocx.cab"></object>


  3. Add VBScript or JavaScript code to your HTML document to set the properties of the control so that it generates the type of bar code that you want as well as the message that you want to encode in the bar code.

    To set properties of the TALtech Bar Code ActiveX Control after it has been placed in an HTML document, you would use JavaScript or VBScript code similar to the following line:

     

    TALBarCd1.message="1234567890"

    Refer to the documentation that comes with the TALtech Bar Code ActiveX Control for a complete reference to all of the properties and methods that are available in the control.

To see an example of a web page that demonstrates generating bar codes with the TALtech Bar Code ActiveX control using the client side technique, download the ActiveX demo.
Note: You must be running a 32 bit version of Windows, have the TALtech Bar Code ActiveX control (or the demo version) installed and your browser must be Internet Explorer version 4.0 or above.