A more secure and elegant way to handle the close event, removes every
created dynamic contents of the dalert onClick of close