Query ajax with parameter only works in IE when th

2019-06-14 11:40发布

I just created an Ajax method. It works if I don't pass any data to the controller. If I want to pass some data to the controller. It works only if I open the IE degguer. I tried to add the cache option to false. But it does not work. Here is some of my code :

function ReportIdLoad(reportId) {
   $.ajax({
        type: 'POST',
        cache: false,
        url: 'WebReportGeneratorView.aspx/ReportIdLoad',
        contentType: 'application/json',
        data: JSON.stringify(reportId),
        dataType: 'json'
    })
}

[WebMethod]
public static void ReloadReportWorkbookContext(string reportId)
{
   //My code
}

Thanks in advance for your help.

1条回答
狗以群分
2楼-- · 2019-06-14 12:02

@Roamer-1888 :

Thanks for the track.

Indeed, It sounds like this problem.

I add the option :

async: false

And I get to my break point.

查看更多
登录 后发表回答