Hey all,
I decided to try and use the query barcode plugin for an app that I have out
there. The app queries a database and then creates and emails PDF's to
customers who bought a voucher. The voucher includes a barcode. Previously I
was using a barcode generator from barcode.tec-it.com, but the barcode prints
their company name on it. No big deal except that I have to call their
generator with each one, and if the company goes under or for waterer reason I
cannot access their site, then barcodes do not generate.
So I can get my barcodes to generate on a regular .cfm page using the following
code:
<script src="../js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../js/jquery-barcode.js"></script>
<cfset Yesterday = #DateAdd("d", -1, Now())#>
<!---Get customer information--->
<cfquery datasource="#Request.LiveDSN#" name="qGetUseremail">
SELECT user_id, Name, Address_1, City, State, Zip, Email, BarCode,
ACC_Code, BirthDate, Deal_Name, DateRegistered, Time_Registered,
Confirmation_Number
FROM Users
WHERE DateRegistered = '#DateFormat(Yesterday,"mm/dd/yyyy")#' AND BarCode
IS NOT NULL
</cfquery>
<cfoutput query="qGetUserEmail">
<script>
$(document).ready(function() {
$("##bcTarget").barcode("#BarCode#", "code39",{barWidth:2, barHeight:30});
});
</script>
<div id="bcTarget">
</div>
Now when I move this div tag inside my cfdocument tag, I get no barcode. I am
not sure if it's a css issue (the plug in defaults to css, and I cannot get the
bmp to output). Any thoughts?
Bruce
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356659
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm