added javascript function to test barcode scanning feature