Home  >  Article  >  Web Front-end  >  About jQueryMobile form submission Servlet problem_html/css_WEB-ITnose

About jQueryMobile form submission Servlet problem_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:03:321555browse

The front desk uses a form form of jQueryMobile, and then submits it to the Servlet for processing. The redirection of the response in the servlet cannot be used. After clicking submit on the mobile phone, the page displays the errorpage prompt text. After querying, it is said that ajax needs to be disabled. After I added data-ajax="false" to the form tag, the server reported an exception after submission.

Without adding data-ajax="false", the submitted content can be saved in the database, but the page will not jump. After adding it, the submitted data cannot even be saved in the database. I don't know if data-ajax= is added. "false", please give me some advice on whether to modify the Servlet, thank you very much!


Reply to the discussion (solution)

Then just use ajax. Why am I so stupid? I solved it myself. .

	    $(document).ready(function () {			$("#submitbtn").click(function(){					cache: false,					$.ajax({					  type: "POST",					  url: "feedback",					  data: $('#feedbackform').serialize(),					  success:function(data){					  		$.mobile.changePage("success.html");					  }			  	});			});        });

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn