Discussions

 View Only
  • 1.  how to create javascript pages

    Posted 10-25-2017 10:22


  • 2.  RE: how to create javascript pages

    Posted 10-25-2017 11:40
    Hi there,

    You can go to the App settings then, click on the new button above the Pages link and select the code page option.


    Give the name <YourPageName>.js



    Please let me know if you have further questions.

    Thanks,
    Gaurav


  • 3.  RE: how to create javascript pages

    Posted 05-30-2018 21:50
    Gaurav,

    I'm having trouble referencing <YourPageName>.js in my HTML code page.

    If the pageid of <YourPageName>.js is 48, is this syntax correct?

    <link href="https://mydomain.quickbase.com/db/mydbid?a=dbpage&pageID=48">;


  • 4.  RE: how to create javascript pages

    Posted 05-31-2018 06:20
    Hi Robert,

    Just to let you know that we use link tag to reference the CSS files and for javascript, we use script tag.

    Here are the examples.

    For CSS:
    <link rel="stylesheet" href="https://yourdomain.quickbase.com/db/bnnp8ryeg?a=dbpage&pageID=70">
    For JavaScript:
    <script src="https://yourdomain.quickbase.com/db/bnnp8ryeg?a=dbpage&pageID=71"></script>
    You can actually use the page name as well.

    https://yourdomain.quickbase.com/db/bnnp8ryeg?a=dbpage&pageName=main.css
    https://yourdomain.quickbase.com/db/bnnp8ryeg?a=dbpage&pageName=modal.js
    _I would suggest you to always use ID because if someone changes the name later then, no need to change the name in your code as you have referenced the ID not name. :)

    Please let me know if need any further information.

    Thanks,
    Gaurav 


  • 5.  RE: how to create javascript pages

    Posted 05-31-2018 13:31
    Thank You Gaurav. 


  • 6.  RE: how to create javascript pages

    Posted 05-31-2018 15:35
    I would suggest the opposite - that you always use the &pagename parameter so you code is understandable and human readable. If for some reason you change the page name just change it consistently including in your code.


  • 7.  RE: how to create javascript pages

    Posted 05-31-2018 19:40
    Make sense my friend. :)


  • 8.  RE: how to create javascript pages

    Posted 10-25-2017 12:02
    i have one more doubt how to handle table fields with java script


  • 9.  RE: how to create javascript pages

    Posted 10-26-2017 17:26
    Everything within QB is handled with field IDs (fid).  You will need to pay attention to field types and acceptable formats.

    I'd familiarize yourself with the API and structure to have a better idea of requirements.
    https://help.quickbase.com/api-guide/index.html