Split off a new function, showAlerts which is called by sendAlerts when
the send button is pushed and is also called when first navigating to
the page.