tags.
<div id="barcodecontainer" style="width:5in">
<div id="barcode" >12345678</div>
</div>
The following Javascript function call will replace the data with the generated barcode.
document.getElementById("barcode").innerHTML
=DrawHTMLBarcode_Code39("12345678",1,"yes","in",
0,3,1,3,"bottom","center",
"","black","white");
We suggest using a <div> container as in the case of "barcodecontainer" as shown above. Simply allocate enough space in the container for including the actual barcode. The container is useful as it will be used by the SDK to determine the alignment of the barcode and the human readable text. In our case above, five inches of space is allocated for the barcode container.
3. We have included the full contents of the HTML file for creating the Code39 barcode below. The get_object Javascript function is simply a wrapper to ensure cross browser compatibility.
HTML Code 39 Source File