in YII2 how to post data using modal dialog?

im using modal dialog. im working with two modal. User Modl and STATE Model User is Parent model and state/create is open in modal dialog.

when im creating new User, i select state name from dropdown if it is not listed in dd then it will create state by clicking add new state and open in modal dialog and create state. issue is after create new state parent page is refresh and all the data which i added are remove.

kindly guide me… i created modal dialog by this link

I have solved this by using ajax post.