I have the following code :
You can Use remote form or remote links, or ajax calls to interact with the controllers and you will be able to get the response back to your view, you can receive it in some other div.
for example it can be done through remoteForm like below:
On your view you can use remote form like:
You will receive your response here
This way you will be able to get the response back to your modal window.