Forum Discussion

IvanWeiss's avatar
IvanWeiss
Qrew Captain
2 years ago

Javascript popup in new supported way

I have a field that has javascript embedded in it to provide a confirmation to the user when they acknowledge via a button.  The code is at the end of this post.

How do I do this in the new approved javascript format?  I guess I need a code page but I basically searched the internet to get this to work, I am not really familiar with javascript.  I dont know how to call a code page or if I just simple move this javascript into it and make it a js file?

var text URL = URLRoot() & "db/" & [_DBID_THE_ELITE_WAY_VIEWS] &
"?a=API_AddRecord" &
"&_fid_6=" & URLEncode ([Record ID#]) &
"&apptoken=HIDDENFORSECURITY" &
"&_fid_8=" & URLEncode(User()) &
"&_fid_10=" & URLEncode(Today());

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

------------------------------
Ivan Weiss
------------------------------

8 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    If you are just looking to execute a URL and refresh the page, this here is sample syntax.  But it will not do a pop up.

    var text Approve = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#])
    & "&_fid_144=Approved";

    var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

     
    $Approve
    & "&rdr=" & URLEncode($RefreshPage)

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • IvanWeiss's avatar
      IvanWeiss
      Qrew Captain

      I do want to alert the user that the button executed.  Vs just the page blinking as it refreshes.

       

      Ivan J. Weiss, CFSP | President & COO elite|studio e

      631.949.6635 www.elitestudioe.com

       

      Connect with us. LinkedIn | Instagram

       

      Please click this link to see my availability for calls:  https://calendly.com/ivanweiss

      CONFIDENTIALITY NOTICE: The information contained in this transmission is intended for the named receiver only. The transmission may contain privileged and confidential material. If you are not the named recipient, please be advised that any use, dissemination or unauthorized copying of the material contained within is strictly prohibited. If you have received this transmission in error, please notify elite | studio e immediately and delete the received transmission. Thank you.



      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger
        .. I don't have an answer for that .....

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------