Nope, That would be the right way to do it.
A "popon" <div>, say. That is, a <div> with a z-index higher than the rest of the page but with display: none; in its style. You just put your message inside that div, change the style.display to "block", and there it is. Maybe allow the user to click anywhere in the <div> to change the style.display back to "none".
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.