auto close ajax model poup

Posted by  benjamin richards
 2114  View(s)
Rate this:

Hi Expert!

I have used AJAX Model popup, that work perfectly, but I want to close model popup auto when model post successfully.

AJAX Model popup code as below

<script type="text/javascript">
        $(document).ready(function () {
            $.ajaxSetup({ cache: false });
            $("#openDialog").live("click", function (e) {
                var url = $(this).attr('href');
                    title: 'Download',
                    autoOpen: false,
                    resizable: false,
                    height: 250,
                    width: 400,
                    show: { effect: 'drop', direction: "up" },
                    modal: true,
                    draggable: true,
                    open: function (event, ui) {
                    close: function (event, ui) {
                return false;

 Thanks in advance


  1. Re: auto close ajax model poup

    Hi Benjamin!

    You can try below line of code for closing Ajax model popup (according your model popup code)

    <script type="text/javascript"> 
     $(document).ready(function () 
     $('#form_id').submit(function ()