jQuery plug-in to hookup AJAX form - MUST provide error callback

Whats the best way to hookup AJAX functionality to an existing Form using jQuery and allow for an error handling callback. The [`jQuery.ajax(...)`][1] built in function has the following (useful) callback functions: > beforeSend > complete > dataFilter > error > success I thought I'd found my answer with the [jQuery.Form][2] plugin, but for some crazy reason they don't give you access to an error callback!! Other than this omission it seems quite useful. I'm really dismayed in general by the amount of articles out there that recommend using `jQuery.get` before they would recommend `jQuery.ajax`. Just to recap: `get()` does not have an error callback, but `ajax()` does. In my opinion you should **always** use `ajax()` because you always should have *some* kind of error handling logic. Are there any other nice plugins - especially something that plays well with ASP.NET-MVC that I should use that make hooking everything up easier? [1]: http://docs.jquery.com/Ajax/jQuery.ajax#options [2]: http://malsup.com/jquery/form/#getting-started

以上就是jQuery plug-in to hookup AJAX form - MUST provide error callback的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏