How to insert a QR-Code on a user form to communicate its contact data easily to a cellphone




var user = document.item;

try
{
 var FirstName = top.aras.getItemProperty(user, "first_name");
 var LastName = top.aras.getItemProperty(user,"last_name" );
 var tel = top.aras.getItemProperty(user,"telephone");
 var email = top.aras.getItemProperty(user,"email");
}
catch(err)
{
 alert("there is an issue");
}

var G_QR_address = "http://chart.apis.google.com/chart?cht=qr";
var G_QR_size = "&chs=150x150";
var G_QR_data = "&chl=MECARD:N:"+FirstName+","+LastName+";TEL:"+tel+";EMAIL:"+email+";";
var G_http = G_QR_address + G_QR_size + G_QR_data;

document.forms(0).QRimg.src=G_http;

Here is the link to QR-code documentation in Google Charts:

http://code.google.com/intl/fr-FR/apis/chart/docs/gallery/qr_codes.html

Here are the different items you can provide with a barcode:

http://code.google.com/p/zxing/wiki/BarcodeContents

Here is how you can create QR code for contact card (supported by Google charts):

http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/function/application/addressbook/index.html

And finally in order to save you some minutes of copy-pasting the code inside your Aras Innovator Instance, here is the export of the QR code integration:

Last edited Dec 19, 2010 at 10:09 AM by yoannmaingon, version 13

Comments

No comments yet.