Error on barcode scanning using custom HTML field using zxing library

Confluence User - 29 Sep, 2021

Hello everyone!


I am trying to perform barcode scanning using custom HTML field, then pass the value into a text field.

In my attempt, I tried to follow the demo provided by Zxing library here and the source code can be find here .

I imported the javascript as a resources in Joget, then paste the index.html codes in the custom HTML field.

In the form builder preview in PC browser, it works fine like below:



But when I login to Joget with my mobile browser and come to this preview, it doesn't work. Inspecting with google chrome shows the below error:


The Message 

Error: Can't enumerate devices, method not supported.

means the library can only be access through HTTP or HTTPS according to https://github.com/zxing-js/library/issues/225 . 

Any ideas about how to do that by using custom HTML, or how can I achieve this in Joget?

Thanks! (smile) 


Regards,

Lee

forms;server;javascript

2


30 Sep, 2021
confluenceUser
confluenceUser

Hi, according to the link you provided, it requires SSL so you have to ensure that you are running Joget in an HTTPS environment.

07 Oct, 2021
confluenceUser
confluenceUser

Hi, 

Could u teach me on how to import javascript as a resources in Joget?

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print