在Ajax之后不要关闭模态

时间:2018-01-27 07:55:22

标签: javascript jquery ajax

当我单击编辑并编辑表单时,我想重置页面背景即ajax页面,但是当我单击编辑时 ,表格被编辑并关闭模态但不完全关闭模态

div ajaxshow是布局上显示ajax页面的div

PeriodIndex(['2014-01', '2014-01', '2014-01', '2014-01', '2014-01', '2014-01',
             '2014-01', '2014-01', '2014-01', '2014-01',
             ...
             '2018-01', '2018-01', '2018-01', '2018-01', '2018-01', '2018-01',
             '2018-01', '2018-01', '2018-01', '2018-01'],
            dtype='period[M]', name='Date', length=1006, freq='M')

Edit Form before click edit

after edit but close modal completely

1 个答案:

答案 0 :(得分:0)

function OnSuccess(data) {
    if (data.status) {
        swal({

            title: "AAAAAAAAAAAAAAAAAA",
            type: "success",
            text: data.message,
            showConfirmButton: false,
            timer:1500
        });

        $('#myModal').modal('hide');

        $.ajax({

            url: "/Forces/Index/",
            type: "Get",
            datatype: "html"
        })
        .done(function (result) {


            $('#ajaxshow').html(result);

        });


    } else {
        swal({

            title: "ثبت شده",
            type:"warning",
            text: data.message,
            showConfirmButton: false,
            timer: 1500
        });
    }
}