jQuery, MVC3: Closing jqModal dialog having view controls (Close button)
===

I have a dialog loaded with the partial view (Grid and Drop down)
 properties of dialog:

         $("#dialog-FinishAccount").dialog({
                    closeOnEscape: true,
                    autoOpen: false,
                    height: 500,
                    width: 700,
                    modal: true,
                    resizable:false,
                    topinfo:"Fields marked with (<span style='color:Red'>*</span>) are required",
                    open: function(event, ui) {
                        var url = "@Url.Action("FinishWorkAccount", "WorkAccounts", new { area = "ver5", wlAccountId = @Model.PatientVisitID.ToString() })";
                        var urlAction = url + "&workList=" + @formValue +"&bitOwner="+ '@owner';
                        $(this).load(urlAction);
                    },
                    close: function() {
        $(this).dialog('close');
                                     }
     });

  
I am opening that dialog from the radio button 

$("#dialog-ForwardAccount").dialog("open");

but my problem is that i have close button on the partial view to close the popup.
also needs to close the popup (X).

This is closing the popup but taking tooo longer 3-4 times than the normal close(X)/ dialog buttons(eg: OK/Cancel)

for now i am refresing the whole page while closing the page but this should n't happen for my case.

please give the right solution to annotate this.
Thanks !!

     

