重定向页面时加载Jquery模态

I have modal on place...and the button in which I need it to do two things in one time,...

when the button save clicked, there is php function called and executed, but while I do that I need to show the modal, even if the background php function is executed, how do I do that?

<button class="btn ID="Save">Save</button>

this is the php controller to php function..

if(isset($_POST['ac'])){
        if($_POST['ac']=='cancel'){
            $class->no($id);
        }
        if($_POST['act']=='save'){
            $class->yes($id);
        }
    }

as you see from the above code, I call yes function to do the php-side work, But in the function at the end I have redirect php method to redirect to other page,

and I have the following Jquery code...

$('#save').click(function(){
     $('#modSave').modal();
        })  

In general, the problem is when I click the button it comes the Modal, But because of the redirect method in the php, when it goes to other page the modal is disappear.

one thing, the php redirect to the same page from some parameter passed pages to its default page.

how do I prevent from disappearing the Modal while or if the page even redirects??