In widget How to close the Model box after getting success without using close button.

In widget How to close the Model box after getting success without using close button.

Hi,

I am using model box to get the details. After getting the details I need to close the model page without clicking the close button. Please help me to solve this problem.