changed msg to alert for now, coffeescript generated js functions don't seem to be available globally (another reason to move away from it)