【问题标题】:Handle web service response (error scenario)not working处理 Web 服务响应(错误场景)不起作用
【发布时间】:2008-11-02 10:05:34
【问题描述】:
function AddTheatres() {
  Services.AdminWebServices.AddTheatresSVC(oTheatres, OnSuccessTheatres, OnError, OnTimeOut);
}

function OnSuccessTheatres(result1) {
  Services.AdminWebServices.AddTicketPricesSVC(oTicketPrices, OnSuccessTicketPrices, OnError, OnTimeOut); //working
}

function OnSuccessTicketPrices(result2) {
  alert(result2); //not working
}

为什么警报不起作用? 在调试调用AddTicketPricesSVC 的函数返回正确的值。

【问题讨论】:

  • @splattne:我删除了之前的帖子,并在没有社区 wiki 的情况下添加了新的 onw。感谢您指出。 :)
  • @splattne:只是我不知道。我认为 wiki 是可以分享的。不知道点问题。

标签: asp.net javascript jquery web-services


【解决方案1】:

您是否实现了 OnError 和 OnTimeout 处理程序?可能是服务器错误?

【讨论】:

    【解决方案2】:
    function OnError(error)
    {
        alert(error.get_message());
    }
    function OnTimeOut()
    {
        alert('System Time Out');
    }
    

    这是实现的方式对吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-12
      • 1970-01-01
      • 1970-01-01
      • 2011-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多