2016-05-31 173 views
-2

我收到“处理异常”错误的代码的这一具体问题:的JavaScript运行时错误:InvalidStateError

{ 

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); 
     } 

} 

我不知道是什么原因造成这一点。我试图运行一个应用程序来保存用户提交的更改。一旦我点击“保存”按钮,就会出现错误。任何帮助表示赞赏。谢谢。

+2

您是否在Javacript控制台或警报消息中看到错误? – Barmar

+0

Visual Studio正在生成此消息。 – julianc

回答

0

尝试关闭你的$(“#accountDetails”)。