In case it helps anyone else, I reversed engineered a number of other pieces of code. The following will popup an alert message when you load a page.
This pops up an alert on top of the page with a Cancel button.
<div id="closethis" class="ui-dialog ui-widget ui-widget-content dialog" style="position: absolute; left: 20%; top: 20%; padding: 5px;">
<div>This is my important message.</div>
<a class="element_toggler Button Button-small" style="float: right; margin: 2px;" aria-controls="closethis" aria-expanded="true">Cancel</a></div>
</div>
This does the same, but it first covers all of the underlying content in gray. Then it puts the popup alert on top of the gray.
***************************
Note there is a warning with this second option. If you make a mistake the gray box will hide the buttons when you view the page and the cancel button will not clear the gray box. This means you will not be able to edit the page. In this case, go to the page URL and type /edit at the end of the URL.
***************************
<div id="closethis" style="position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: gray;">
<div class="ui-dialog ui-widget ui-widget-content dialog" style="position: absolute; left: 20%; top: 20%; padding: 5px;">
<div>This is my important message.</div>
<a class="element_toggler Button Button-small" style="float: right; margin: 2px;" aria-controls="closethis" aria-expanded="true">Cancel</a></div>
</div>
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.