Java script execute on a button

Options
Dale_Bunnett2022
Dale_Bunnett2022 Member Posts: 4
edited April 2022 in Ask a Question

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_Cre8
    Aj_Cre8 Member Posts: 651 MVP
    Options

    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
    Options

    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_Cre8
    Aj_Cre8 Member Posts: 651 MVP
    Options

    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_Cre8
    Aj_Cre8 Member Posts: 651 MVP
    edited April 2022
    Options

    Let me know.

  • Dale_Bunnett2022
    Dale_Bunnett2022 Member Posts: 4
    Options

    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_Cre8
    Aj_Cre8 Member Posts: 651 MVP
    Options

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