javascript - jQuery: ajaxSubmit / ajaxForm any significant difference? -
somehow ajaxsubmit , ajaxform
kinda play same role. if so, then, there significant difference between them ? if so; use, when , why?
the faq reads:
what difference between ajaxform , ajaxsubmit?
there 2 main differences between these methods:
- ajaxsubmit submits form, ajaxform not. when invoke ajaxsubmit serializes form data , sends server. when invoke ajaxform adds necessary event listeners form can detect when form submitted user. when occurs ajaxsubmit called you.
- when using ajaxform submitted data include name , value of submitting element (or click coordinates if submitting element image).
so, ajaxsubmit
submits form destination while ajaxform
preps , waits form submitted.
your run ajaxsubmit
in place of $("#formid").submit()
update
in response comment below uploadprogress
options page on same site says:
note: aside options listed below, can pass of standard $.ajax options ajaxform , ajaxsubmit.
both ajaxform , ajaxsubmit support numerous options can provided using options object.
there nothing on uploadprogress
being excluded either uploadprogress
available in both. how that's used different question altogether ;-)
Comments
Post a Comment