Above code submits form and json is returned. In desktop web browser returned json is evaluated by success code in ajaxForm, but in mobile web browser returned json is rendered inside body tag. So ajaxForm failed and normal form submission took place ?
Also looking into chrome developer console for mobile web browser request in network option shows Initiator as Other for web version value is jquery.min.js 2 script. This confirms normal form was submitted.
HTML code contains
jinja2 syntax
Above code submits form and
json
is returned. In desktop web browser returned json is evaluated bysuccess
code inajaxForm
, but in mobile web browser returnedjson
is rendered insidebody
tag. SoajaxForm
failed and normal form submission took place ?Headers
Desktop
Mobile
Straightforward guess is missing
X-Requested-With: XMLHttpRequest
in mobile version, setting this inbeforeSend
doesn't help.Also looking into
chrome developer console
for mobile web browser request in network option showsInitiator as Other
for web version value isjquery.min.js 2 script
. This confirms normal form was submitted.