Hi Balaram,
In order for you to know when a submit was successful, you need to look at the dataset API (not the submit button API).
the function you are looking for is the dataset event handler: onAfterSave. You can check the documentation here:
Cheers,