code 128 barcode in javascript
496723Jun 14 2006 — edited Jul 12 2006hi,
i am trying to get a code 128 barcode based on 3 items in a form. it currently wont scan in. i think this is because i have not got a start, stop or check sum. i was wondering how to do this and what the start and stop flags are.
the code i have is :
<html>
<head>
<style>
@font-face
{font-family:"Code 128";
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 268435456 0 0 -2147483647 0;}
</style>
<script language="JavaScript" type="text/javascript">
var i = 1;
job_id = 'A' + document.getElementById('P6_item1').value + document.getElementById('P6_item2').value + document.getElementById('P6_item3').value;
astr = '<html><head></head>';
astr += '<body lang=EN-GB style=\'tab-interval:36.0pt\'>';
astr +='</span></p>';
astr +='<div id="aDiv" style="width: 100px; height: 100px;">';
astr +='<p class=MsoNormal><span style=';
astr +='\'font-size:20.0pt; font-family:\"Code 128\"\'>';
astr += job_id;
astr +='</span></p>';
astr +='</div>';
astr +='</body></html>';
document.write(astr);
if (!document.all.aDiv.style.filter)
document.all.aDiv.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + i + ')';
else
document.all.aDiv.filters.item('DXImageTransform.Microsoft.BasicImage').Rotation = i;
document.write(job_id);
</script>
</head>
</html>