Skip to main content
Question

Javascript $.getScript inconsistencies

  • March 28, 2018
  • 0 replies
  • 42 views

Forum|alt.badge.img+2
I'm inserting javascript into a form using the img onload method  (   https://community.quickbase.com/quickbase/topics/how-do-i-setup-the-image-onload-technique-iol ) which is great work by Dan Diebolt, but the results aren't consistent in various browsers and difficult to debug from within developer tools. F5 (reload) doesn't trigger the script in firefox but does in chrome. 

What's the reason that I can't insert a javascript file directly? It would be so much easier.
This topic has been closed for replies.

  • Quickbase Alumni
  • March 30, 2018
Placing your JavaScript into a code page should be the last thing you do. Normally you develop the script by working exclusively in the console as it is faster than updating the code page repeatedly. 

There is nothing inconsistent about how $.getScript() works. The jQuery team has pounded out any problem with it years ago. You can use Shift F5 to force a cache reload. See:

https://stackoverflow.com/questions/20569394/whats-the-difference-between-f5-refresh-and-shiftf5-in-...

>What's the reason that I can't insert a javascript file directly? It would be so much easier.

I agree. That questions would have to be answered by QuickBase directly. The IOL technique is a workaround for this limitation.

Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • July 4, 2018
Hi Dan, thanks for all the great work in unlocking js for the community, if it wasn't for that I'd have to say "no can do" far too often, and now each time its maybe and then yes.

How do you mean don't place the js in a code page, that's the ultimate location to place it in though isn't it? My workflow now is to download a page locally, insert the js inline and then work on it until its good and then place it in a code page. Still the ability to use the developer tools on live code would be helpful. Do you know why QB isn't opening this up more, I can understand that they don't want to support it which makes sense but  js vastly enhances QB's capabilities. Still, pretty happy with your solution!