Ajax form submit in jQuery mobile. A Myth

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

Does jQuery Mobile even support ajax form submits? This probably sounds like a ridiculous question, but after fighting with it for hours, and then checking the jquerymobile.com docs, I m starting to think that it doesn t!

I ll skip my own code, and go right to jquerymobile.com.

http://jquerymobile.com/test/docs/forms/forms-sample.html http://jquerymobile.com/test/docs/forms/forms-sample.html

This page has a section called Default Ajax form example wherein the author very briefly tells us how jQuery mobile handles ajax form submission. In his/her words, "jQuery Mobile will make sure that the Url specified is able to be retrieved via Ajax, and handle it appropriately." Obviously, lots of detail there. And ironically, the sample provided does NOT call results ajaxily. It merely redirects to the results php script. No ajax is performed. The form is a standard html form with an action and method. It looks like should behave exactly as it does, redirecting to a new location. Somehow JQM is supposed to jump in and set up ajax automatically but it doesn t do that on my iPhone, or in Safari, Firefox, or Chrome.

Am I going crazy, or is JQM simply incomplete, and advertising this functionality falsely?

Answers

Thanks guys. I was unaware that the URL was being rewritten upon the ajax pull. It looks just like a regular location change if you don t have any content prepared yet. I feel a little silly.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/10809880/ajax-form-submit-in-jquery-mobile-a-myth

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils