add popup at the bottom of the page if record was writed or show alert if not