Mazzy
Mazzy

Reputation: 14179

jquery mobile form: pass data in a form

I read on the web many things about creating form in jquery mobile and I didn't understand one thing. When I create a form and I would pass data through php, I hear jquery mobile serialize them and automatically pass over and if the form has been created using post method I can use them in an other page only using _POST array and nothing all. But I read also some people like it form with ajax use ajax to pass variable. So I didn't understand why use ajax?

Upvotes: 1

Views: 249

Answers (1)

shanabus
shanabus

Reputation: 13115

The default for the jQuery Mobile framework is to submit forms via HTTP POST. Why? because then your web application has greater control over the UI when animating through pages, creating a smooth transition. Well, a better description can be found in the jqm docs here.

If you are looking to disable the default Ajax functionality, just append this to your form element:

data-ajax="false" 

Hope this helps!

Upvotes: 1

Related Questions