Skip to main content
Question

Previously working JAVA Scripts do not work anymore

  • August 12, 2019
  • 0 replies
  • 383 views

Does anyone experience the issue of buttons that run JAVA Scripts to create/update records do not work? The buttons were working until August 8th and stopped working since August 9th.
This topic has been closed for replies.

Forum|alt.badge.img+17
  • Community Moderator
  • August 13, 2019
Hi NK23,

Unfortunately, this kind of issue can crop up with Javascripted buttons, if they are interacting with areas of the product that are changing this can cause them to break or have unusual behavior since they aren't directly supported. What exactly are you using the button to do? It is possible that what you have currently could be transitioned into a button that triggers a code page with the help of some of the Community experts or possible replaced with some native functionality. 

Thanks for the response. The button is programmed to call a JAVA Script code page (.js) to gather records from one table, process it and upload the results in another table.


Forum|alt.badge.img+2
  • Registered
  • August 13, 2019
I have the same problem. JavaScript button was working in Chrome, now fails.  It DOES still work using Edge. Similar to original poster, my button calls a .js page, which does some calculations, then updates a record. It isn't complex. I'm not an adept javascript user, but my simple debugging techniques (an alert inside the code) indicate the page isn't loading at all. Chrome settings allow JavaScript, and pop ups.

This reply was created from a merged topic originally titled Calling Multiple URLS with a Javascript Formula Button - used to work, now broken....

For the better part of the last year we've been using a formula button with javascript to call two URLs at once, then reload the page.

One URL sends a text message (via webhook to an external system), while the other edits a record in our database to log the action (the variables $sendText and $logText below, respectively).
"javascript:" &
"$.get('" &  $logText &  "');" &
"$.get('" &  $sendText &  "',function(){" & "location.reload(true);" & "});" &
"void(0);"
Up until about a week ago this technique worked with virtually no issues but now it just opens a blank page and does nothing else.

I have tested the two individual URLs by putting them into their own buttons, and they continue to work fine, which leads me to think there is something wrong with our Javascript. I suspect it may be relying on assumptions about Quickbase or the page structure which are no longer true with the latest update. Any ideas?

Thanks in advance!
Jonathan

Forum|alt.badge.img+11
  • Quickbase Staff
  • August 13, 2019
Hi all. We are unaware of anything we changed that would have impacted this. As Evan mentioned, this is an unsupported technique that we cannot regression test for. That being said, I'd love to learn what the use case is if I can replicate the issue. Would anyone be willing to invite me into the app (hhersch@quickbase.com) and send me a link to a test record?


I have a support case opened for this issue. case #598685. I can provide access to my App through the support case record.


Forum|alt.badge.img+2
  • Registered
  • August 14, 2019
For what its worth, 
tldr: I changed the definition of the QuickBase button, unchecking the "open target in a new window", and now the button works for me.

Longer: Chrome version 76.0.3809.100 did change behavior. I didn't understand most of what the change talked about. It did cover issues regarding opening a new window, copying context, and queueing up clicks. Chrome folks said the changed behavior is the correct behavior, and will not be changing it back. For my application, I did not need or want a new window opened. I was surprised to see the checkbox for my button filled in to open a new window.  It was worth experimenting to remove the check, and looks like that solved the problem for me.  

Good luck all, hope you find solutions that fit your applications.

This worked for me as well, at least in Chrome. Funny because I distinctly remember having to check that box in order to make the button work back when I first created it, so yes it looks like the Chrome update was the culprit here.

Thanks to everyone who helped out with this!