Alternative to the standard JavaScript alert method