Messagem after save the item of list (effective save)

I need show the message ‘Thank you for the submission’ after save item of list.

Looking for ideias in internet the solutions show message even the form have some error…I would like the message show only after effective save.

seems to me that javascript code is conditioned only to the click of button and not the save event.

some ideia?