【问题标题】:Response Handling equivalent in jQueryjQuery 中的响应处理等价物
【发布时间】:2016-10-22 17:56:04
【问题描述】:

response.rjs() => 将整个响应评估为 Javascript,这是 Rails RJS 响应所必需的。

response.execute(fn) => 调用传递给它的函数对象。

.on(responseStatus) =>仅当服务器响应AJAX请求返回的状态码为responseStatus时才执行响应函数。 但是 jQuery 中的等价物是什么-

POST(this.up('form').action, data);
response.rjs().on(200);
response.execute(function () { 
  qPanel.hidePanel();
}).on(200);

【问题讨论】:

    标签: javascript jquery ruby ruby-on-rails-3 prototype


    【解决方案1】:

    我已将库 application_handle-min.js 的代码转换为 ujs 并解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-11
      • 1970-01-01
      • 1970-01-01
      • 2016-08-30
      • 2011-10-15
      • 1970-01-01
      • 1970-01-01
      • 2015-06-24
      相关资源
      最近更新 更多