Forum Discussion
Hi Austin,
Yes my apologies I forgot to include the other attempted syntaxes.
I have tried:
location.reload();
location.reload(true);
window.location.reload();
window.location.reload(true);
histroy.go(0);
All of which give the [object Object] error
I have also tried:
window.location=window.location
window.location.href=window.location.href
Both of these execute the API call, but seem to freeze the page without refreshing it.
*Edit* had the order of "location" and "window" accidentally reversed
------------------------------
Peter Rebholz
------------------------------
- BlakeHarrison5 years agoQrew CaptainIf the button is only doing these two functions - checking a field and then reloading the page, you can build the button without the JS. Here is how I would suggest:
var text chk = "&_FID_34="; var text tk = "token"; "<a class='Vibrant Alert' & href=" & URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=" & $tk & "&rid=" & [Record ID#] & $chk & "1" & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]) & ">Check and Refresh</a>"
Just update the FID and the Token in the Var's and you should be good to go.
------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quick Base Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------- hhersch5 years agoQuickbase StaffHi Peter - as Blake mentioned, doing this natively is the best method. We technically do not support JavaScript in formulas. Also, IE11 has a lot of interesting oddities that might cause things like this. Do you mind if I ask if there is a reason your users aren't on a more modern browser?
------------------------------
Harrison Hersch
------------------------------- PeterRebholz5 years agoQrew Member
Hi Harrison,
Yes I try to avoid JS as much as possible since it could become obsolete within Quick Base, but since there are several reports which the button appears I could not find a native way to redirect back to the page the button was clicked on.
There are a few tasks that require the use of IE, infuriating as that may be, but they are not the majority of daily tasks as far as I know. I would much prefer that they switch to a more modern browser for everyday use and use IE only when necessary. If a solution cannot be found I'm sure (barring any reason I may be unaware of) we could mandate a switch.
------------------------------
Peter Rebholz
------------------------------
- PeterRebholz5 years agoQrew Member
Hi Blake,
Thank you for the response! While this does work, it always redirects back to the form.
This button appear on several reports and I was hoping that the user could click on the button, and then have the page refreshed so that they can see the other options that appear on that report as a result.
------------------------------
Peter Rebholz
------------------------------- hhersch5 years agoQuickbase StaffThe best way to handle this today in a supportable fashion is making multiple buttons. However, we will add some capabilities to formula-url buttons to better handle a redirect.
------------------------------
Harrison Hersch
------------------------------