All you have to do is use:
window.open("https://script.google.com/macros/s/web_app_ID/dev",'_top');
My original answer below works, but not needed:
There is a software "Work Around" for reloading / updating a page in the Script application. It is based on the ability of the html link tag to reload the page and the ability of JavaScript to trigger a click event on this tag. You can hide the link if you want.
- Add link tag to your HTML
- Hide link tag if you want
- Add client-side code in the Script tag to trigger a click event on the link tag
- Run the code however you want
Test Button:
<button onmouseup="reloadTheWebApp()">Trigger the Link Tag</button>
Link
<a id="testLink" style="display:none" href="https://script.google.com/macros/s/script_ID/exec">Reload the Web App</a>
Script:
<script> window.reloadTheWebApp = function() { console.log('reloadTheWebApp ran'); var linkTag = document.getElementById('testLink'); linkTag.click(); } </script>
It may be preferable to implement a simple page navigation system:
Page Navigation Web Application - Script Applications
source share