Discussion Locked

Creating barcodes on your pages

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The June 1, 2004 edition of the Web Development Zone e-newsletter explains how to create barcodes on your pages. How familiar are you with barcodes, DHMTL, and SVG? Will you be able to apply this particular tip in your development environment? Please let us know.

If you aren't subscribed to the free Web Development Zone e-newsletter, you can automatically subscribe to this e-newsletter by pasting the following URL into your browser:
http://nl.com.com/MiniFormHandler?brand=builder &subs_channel=bldr_front_door&list_id=e055&tag=fb

* Please delete any extra spaces that appear when you paste this URL into your browser.

13 replies

by jsowellxii

Though this is very interesting to me I would like to ask: Why or when you would want to use barcodes in your website?

by andrew houghton

You might want to use barcodes on your web site for delivering coupons to your visitors. Microsoft, has started using them as admission tickets for live events. So I sign up on their web site for a live event in my area and they send me to an admission ticket web page, which I then print out. I bring the page I printed out to the event and they scan the barcode to know that I'm really registerd and who I am, what organization I belong to, etc.

by mark.petereit

We developed an online workflow application for our HR department, to intelligently route HR-related changes to employee records. The only issue we had remaining was to figure out how to "attach" paperwork that may be related to a change action (i.e. marriage certificate to support a name change).

Obviously, rolling scanners out to 300+ managers was out of the question. But we do have a rather cool document scanning/archival application that utilizes barcoded seperator pages to index the archived document images.

My solution was to add a button to the online action form called "Attach Paperwork". Clicking the button would generate a fax cover page with the workflow incident ID barcoded on it. The cover page would instruct the manager to print out the cover page and fax the paperwork to a predetermined number. That fax number would be to a fax board on the archival system, which would then archive and index the images so the workflow product could "attach" it to the workflow incident.

The only part of this that was hanging up development was figuring out the best way to dynamically generate the barcode. Thanks for a VERY timely article, Phillip!!

Mark Petereit
HRIS Systems Administrator
Truman Medical Center, Kansas City

by theburbs

The author claims that IE5.0 is required, but it doesn't seem to generate the barcode in IE6. I haven't found any use for VML in a browser (and even less so bar codes), so have never tinkered with anything to do with the VML specification. What did he overlook?

by andrew houghton

Change the to

He forgot to declare the VML name space. Since he also didn't bother to add a DOCTYPE so IE 6 knows what version of HTML he is using, this causes other problems. Basically, the VML tags he created without the VML namespace will not be closed. So in IE 6 you will get and not . IE 6 sees a bunch of non-closed tags and doesn't display anything since there is no data content. The VML behaviour doesn't see the namespace so it doesn't act upon the tags. He should re-read the MSDN documentation and pay attention to the examples... But cool example once it does work.

by manny

it seems that you already got it to work!
(i had noticed that the original script was missing the

by jeff dickey

...of standards like DHTML, CSS, SVG, LSMFT, etc., to have open, portable data formats so that we wouldn't get locked into one vendor's product line, or worse, one specific version of one specific product? It seems to me that some of the folks saying "Yeah, standards are great, as long as you're using IE" miss the whole point. Maybe they should go talk to some mainframe jockeys from the '60s and '70s so they can understand why we had a PC "revolution". Hint: it wasn't merely to substitute one corporate megalith for another.

by swillyhem

"button onclick=" instead of "button onfiltered=" and you should be working with the above changes made too.

by olwen

I do mostly intranet work where this is an extremely useful idea. I would maybe not do it in SVG, but would perhaps use a PHP routine, or add the idea to a dynamically generated PDF (I'm making these with an open source PHP class, and could easily adapt this code for that)

by maryweilage

Thanks to everyone who posted your comments and suggestions about this week's Web Development Zone e-newsletter. Unfortunately, we experienced a production glitch, in which the first line of code appeared as in the delivered version of the e-newsletter rather than . (The code was correct in the author's submitted column.)

Also, we're aware that some mail clients parsed the script in that e-newsletter, translated the code, and changed onclick to onfiltered.
We apologize for any inconvenience these issues might have caused.

Thank very much to everyone who posted to the discussion and shared the solution to the problem with your peers.

Thank you,
Mary Weilage
E-newsletter Editor

This discussion is closed to new replies.