Skip to main content
Question

Button in mobile

  • May 26, 2020
  • 0 replies
  • 73 views

I have a button that adds a record in a child table and reloads the page. Since it includes javascript syntax, it would not work in mobile site. Can someone help me re-write this in a way it should work in mobile or it's not possible? 

Here is the code:

If([Amount of open clock-ins]>0,"javascript:alert('You are already clocked in!')",

var text url=
URLRoot() & "db/" & [_DBID_TIME_IN_OUT] & "?a=API_AddRecord&apptoken=[mytokan]&_fid_10=" & URLEncode ([Record ID#])&"&_fid_8=In";

"javascript:" &
"$.get('" &
$url &
"',function(){" &
"location.reload();"&
"});" &
"void(0);")

Thanks

------------------------------
EOM Develepors
------------------------------

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • May 26, 2020
Not tested recently but you can try this

var text url=ONE
URLRoot() & "db/" & [_DBID_TIME_IN_OUT] & "?a=API_AddRecord&apptoken=[mytokan]&_fid_10=" & URLEncode ([Record ID#])&"&_fid_8=In";

var text URLTWO = the url that you want to land the user on.;

$URLONE
& "&rdr=" & urlencode($URLTWO)


let me know if that works.

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------