How to convert script function into Reactive Web.
Application Type

Hi, I am just starting out in web development using OutSystem, for Reactive web projects I am confused with JavaScript.

 <script type="text/javascript" src="../../Scripts/jquery-1.8.1.min.js"></script>

  <script type='text/javascript'>

        $(function () {

            // setup anchor

            var url = document.getElementById("hfUrl").value;

            var returnurl = url + "?code={CODE}";

            $(".readLot").each(function () {

                var $this = $(this);

                $this.attr("href", $this.attr("href") + "?ret=" + escape(returnurl));




For use,

<a href="zxing://scan/" class="readLot">

                            <img src="../image/Icon/qr_code_22130.png"

                                style="border-width: 0px; width: 130px; height: 130px;"></image></a>

I can run / run it via Zxing mobile application, but when I read the qr-code, it doesn't automatically open the link as I wrote it before. I tried converting the script but I couldn't understand.

Hello @Pongsakorn Pakkhemayang 

What do you want to use in this case the javascript? if you want to use the QR code, there is already a component where you can put a URL and the javascript is already there to open your link by reading the QR code.

For example this one

And also:

If you want to continue with your jquery code, first I will say to convert to vanilla javascript, and then you will need to use the block javascript where you can pass input parameters, and use inside your javascript code.


Márcio C.

Dear @Marcio Carvalho 

I developed a web on from the above code. I created a keypad to scan the qr-code and redirect to the desired page or function via writing the script above and I use Zxing app as a third party app to call the web browser. Can I use the barcode sample that you have brought? Because my project is Reactive web and not mobile, or am I missing something?

No, you are not missing anything. The first link you can use in reactive :)
You have documentation inside, and how to use it too! :)

Dear Marcio Carvalho

Okay, I am mistaken. I don't need to generate a qr-code, but I want to know how to port the original java script to the executable from zxing that I have written. And my workflow project is

Scanner Page (as web app) --> Click scan button --> open Zxing app (mobile app) --> read qr-code --> open that link if it found (base on current url + query parameter like

Note, image1 is my project web app

           image2 isZxing mobile application that has been installed on my mobile phone

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.