Forum Discussion

JasonBeaver's avatar
JasonBeaver
Qrew Cadet
5 years ago

URL Button to check a checkbox

I am trying to use a button to check  a checkbox.  The page refreshes but the checkbox is ever checked.  Any idea what could be causing this?  Any help would be appreciated.  Thanks

var text URL =
URLRoot() & "db/" & Dbid () & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_45=1";

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

------------------------------
Jason Beaver
------------------------------

4 Replies

  • AustinK's avatar
    AustinK
    Qrew Commander
    Do you have app tokens enabled? You may need to include that in your URL as well.
    • JasonBeaver's avatar
      JasonBeaver
      Qrew Cadet
      Well, that was simple.  

      Thank you very much.  I did not realize that tokens were enabled as default, when crating a new app.

      ------------------------------
      Jason Beaver
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Jason,

        When you use that javascript refresh, it will refresh no matter if you just set off WW III of error messages or a global pandemic (sorry, is it too soon for humour) .

        So the way to debug is to comment out the Javascript refresh and just run the 

        $URL

        That will expose the error message, which in your case would have said "Missing App Token".

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