Java script execute on a button

Dale_Bunnett2022
Dale_Bunnett2022 Member Posts: 4
edited April 8 in Discussions

trying to add this to a button but does not want to execute

<a class="rj-order-online" data-rj-company-id="4244">Online Order Now!</a>
<script src="https://cdn.restajet.com/webapp/webapp_popup.min.js" defer async></script>


tried adding <script>

dmAPI.loadScript to the code but nothing.

Can anyone help?

Tagged:

Answers

  • Aj_Pfeil
    Aj_Pfeil Member Posts: 229 MVP

    What are you trying to integrate? If you are wanting to use API you should be able to build a Button Widget for this and not call it from the editor itself..

  • Dale_Bunnett2022
    Dale_Bunnett2022 Member Posts: 4

    trying to open a page as a pop up but a whole page, this is for a online takeaway ordering system,

    The script is what restajet gave me to integrate

  • Aj_Pfeil
    Aj_Pfeil Member Posts: 229 MVP

    Try adding it to an HTML widget, not to a button.

    It's creating a link already, so adding it to a button within Duda will throw an error.

  • Aj_Pfeil
    Aj_Pfeil Member Posts: 229 MVP
    edited April 10

    Let me know.

  • Dale_Bunnett2022
    Dale_Bunnett2022 Member Posts: 4

    Duda Support are looking into it for me as I can do a link but want it to pop up within the page as WordPress and web flow does. Gloria food is awful been there done that had 10 restaurants as a reseller and not great. Restajet is more options and customisations. and the I have manged to integrate it straight into their ICR pos

  • Aj_Pfeil
    Aj_Pfeil Member Posts: 229 MVP

    Why not put the button in Duda to open a Pop-up, then have the script on that pop-up in an HTML widget?