我有一个使用Rails 3和jQuery-forms的网站,我正在Firefox和Chrome中进行测试。
为了进行测试,我让服务器每次返回422状态码。
当我提交表单时,Firefox正确地显示“错误”。但Chrome错误地显示“成功”。
有人知道这是什么原因吗?
为了进行测试,我让服务器每次返回422状态码。
当我提交表单时,Firefox正确地显示“错误”。但Chrome错误地显示“成功”。
有人知道这是什么原因吗?
$('form').ajaxSubmit({
dataType: 'json',
success: function(responseText, statusText, xhr, $form) {
console.log("It hits success");
},
error: function(responseText, statusText, xhr) {
console.log("It hits failure");
}
});