0

我正在通过 jquery ajax 异步调用加载 HTML 表。比如说 5 个人,他们的数据将通过异步 ajax 调用加载。ajax 调用五次访问服务器,并在收到数据时异步显示数据。这些行包含一个链接,用于打开显示人员记录的弹出窗口。

问题是当我在其他数据仍在加载时单击链接时,弹出窗口会打开并显示一个空白页面,直到完成剩余的 ajax 调用。

我该如何解决这个问题?

这是我的jQuery代码:

$.ajax({
  type:'POST',
  url:'Default.aspx',
  data:JSON.stringify(jsonParams),
  contentType:"application/json; charset=utf-8",
  async:true,
  dataType:'Text',
  success: function(response){ //paste the data to the html table }

});

这是我的服务器端代码:

protected void Page_Load(object sender, EventArgs e)
{
  StreamReader r = new StreamReader(Request.InputStream, Request.ContentEncoding);
  string jsonStr = r.ReadToEnd();
  MyJsonObj obj = new JavaScriptSerializer().Deserialize<MyJsonObj>(jsonStr);
}
4

1 回答 1

0

似乎来自网络服务器或浏览器的一些限制(每个 IP有N个连接?

于 2013-08-27T12:22:16.363 回答