jquery forms file upload: why do field values reset?

I have a form with some elements like: The form includes one input of type 'file'. The whole business is wired up to a REST server via `$(form).ajaxSubmit(submitOptions)`, invoked from the submitHandler of the validate plugin, http://bassistance.de/jquery-plugins/jquery-plugin-validation/. Whenever I submit, the form input fields go back to their default values as per the `value` attribute. Is there a way to prevent this? A Chrome DOM breakpoint suggests that this is happening as a result of the machinations of the validation plugin, so I suspect that the issue is there. Central spot in the code: $("#query-upload").validate({ submitHandler: function(form) { $(form).ajaxSubmit(submitOptions); } });

以上就是jquery forms file upload: why do field values reset?的详细内容,更多请关注web前端其它相关文章!

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

评论 抢沙发

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

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