Quick Base Discussions

Expand all | Collapse all

Add Javascript to a button

  • 1.  Add Javascript to a button

    Posted 03-01-2017 23:41
    Original Post:
    • Asked by Ralph
    • a month ago
    I know VERY little about the frontend and how it works, I usually work on the backend API side. I would like to know if there was a way to add a button to a form and have it call some javascript which would make an ajax call to an outside webservice.

    Thanks

    Ralph



  • 2.  RE: Add Javascript to a button

    Posted 03-01-2017 23:42
    Answer

    Your question involves two different issues:

    1) How to launch script from a button?

    2) Can your API be called client side from QuickBase?

    To answer the first question see the attached pdf named "Button Study" which demonstrates six different ways to attach a script to a button. Since you are new to frontend you may want to just use the first method as the remaining methods deal with more advanced schemes.

    To answer the second question your API needs to support CORS (Cross Origin Resource Sharing) or return JSONP (JSON with Padding). It would help if you could identify the API and point to the docs.



    Was this answer helpful?

    Answered by:
    Original
    dandiebolt_QB_Pirate , Pres. of Service Worker Union
    QuickBase Pro a month ago