Submitting JQuery Mobile forms through AJAX and PHP (two articles)

PHP中文网
Release: 2016-08-08 09:31:26
Original
1278 people have browsed it

Submit jQuery Mobile forms via AJAX and PHP


++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++


jQuery mobile form submission


http://blog.csdn.net/tjpu_lin/article/details/ 28394253

Recently, I was developing a mobile page using jQuery mobile, and encountered a problem when submitting the form.

The background is processed by servlet. If you want to use the redirection in the servlet to jump to the page and forward it to the mobile phone, it will not work at all. An errorpage message will appear.

After consulting online information and the jQuery mobile API, I learned that jQuery mobile form submission defaults to ajax submission, so the page jump function will not be implemented at all if the page jump is written in the servlet.
So I added the attribute data-ajax="false" to the form according to the tutorial, and found that not only the page jump could not be performed, but also the background database operations could not be performed, and a 500 error was reported.



I have thought for a long time that since I use ajax to submit, I will use ajax to jump the page

Copy after login
   Submit a form via AJAX    

Call Ajax

GiantFlyingSaucer

Copy after login

Note that the data in js