Wednesday, May 25, 2011

jQuery Mobile How to submit a form without Ajax

Disable all
Add $.mobile.ajaxFormsEnabled = false;
*The order loading javascripts have to be jquery > disable code > jquery mobile .
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6b1.js"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function(){
   $.mobile.ajaxFormsEnabled = false;
});
</script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>

Disable specific form
add data-ajax="false" attribute into form tag.
<form data-ajax="false">
.
.
</form> 

No comments:

Post a Comment