Javascript action that works with a html page

0
So Basically I am working with a bar code scanning external library.   In the system They have a simple html page and a javascript file. Inside the javascript file it can load up the html elements and then manipulate the views. So On the camera screen when a barcode is scanned I can see that info in that screen directly as a small floating value. In Mendix I have found that I can add a javascript action or via the widget I can add a html or javascript file. In this case, Is there a way to add the javascript and html file directly? so that js can load up the values from html?   If there are more videos or tutorial on external sdk integration in mendix I would like to check that out too.   Kind Regards Pratik
asked
1 answers
0

I dont think there is a tutorial directly for what you are asking or trying to achieve.

However when you said a Pluggable Widget, that seems like 1 of the ways through.

Since a Pluggable widget is nothing but a HTML/JS being shown inside Mendix pages, why not do below.

  1. Make a Pluggable widget (default options)
  1. in the root .tsx file return the HTML block that your plugin provides (not the while HTML but just the block which is needed)
  2. find a react package for your external library (or perhaps make one if you cant find one) and install it as a dependency in your plugin react code
  3. try to get the JS object of your library in the React code

See if by then the desired outcome can be reached. I know its a long shot but worth the try.

answered