简体   繁体   English

JavaScript 运行时错误:InvalidStateError

[英]JavaScript runtime error: InvalidStateError

I'm getting an "Unhandled Exception" error at this specific point of the code:我在代码的这个特定点收到“未处理的异常”错误:

{

function loadAccount(accountId) {
    // here->
    $("#accountDetails").load('/RxCard/GetAccount', { accountid: accountId }, function (response, status, xhr) {
        if (status == "error") {
            var msg = "Sorry but there was an error: ";
            alert(msg + xhr.status + " " + xhr.statusText);
        }

}

I have no idea what is causing this.我不知道是什么原因造成的。 I'm trying to run an application that will save the changes a user submits.我正在尝试运行一个应用程序来保存用户提交的更改。 The error appears as soon as I click on the "save" button.单击“保存”按钮后,错误立即出现。 Any help is appreciated.任何帮助表示赞赏。 Thanks.谢谢。

尝试关闭您的 $("#accountDetails").load with });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM