Skip to main content
Question

Page not refreshing after button click (+ record update, + popup page)

  • September 20, 2023
  • 0 replies
  • 160 views

Forum|alt.badge.img+6

I want to:    Hit original button (formula URL field), update field ID #7 to now(), open splash page (as a popup), close splash page (via splash page button), return/refresh original page. 

Everything works except auto-refreshing the original page once the splash page/popup closes. 

I've tried conducting these activities in several different orders without success. 

Any help in getting me past that last hurdle will be appreciated......Aaron

-------------------------------------------------

Formula URL for the initiating button:

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

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=<token>&rid=" &[Record ID#] & "&_fid_7=" & Now() & "&rdr=" & URLEncode($SplashPage)& "&rdr="&URLEncode($RefreshPage)

-------------------------------------------------

Splash Page  (html):

<h1><p><u>Your command has executed.</u></h1>

<button onclick="return closeWindow();">
    Close Window
</button>
 
<script type="text/javascript">
  window.resizeTo(950,500);
    function closeWindow() {
 
        // Open the new window with the URL replacing the
        // current page using the _self value
        let new_window = open(location, '_self');
 
        // Close this window
        new_window.close();
 
        return false;
       window.resizeTo(950,500);
    }
</script>



------------------------------
Aaron B
ab1692@att.com
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9

I would convert the formula url to a formula rich text and do the following: 

"<a class='Vibrant Success OpenAsPopup' data-height=950 data-width=500 data-refresh=true href=\""& $url &"\" >Button Label</a>"

This will run your url and open whatever link you're targeting and then when you close the popup it will refresh the page for you. 



------------------------------
Chayce Duncan
------------------------------