I'd put the this.hide() call in an else clause below. No need to hide it if you're are just going to show it again for a persistent message.