I have a button in the jquery mobile form, which defines the post action attributes.
<form id="form1" enctype="multipart/form-data" data-ajax="false" method="POST" target="uploadTarget" action="https://graph.facebook.com/me/photos?access_token="...">
<input id="source" name="source" type="file">
<input id="message" name="message" type="text">
<button id="upload" type="submit" name="upload">Upload Photo</button>
</form>
The post method on the form is not called when I click on the styled button.
The method ‘post’ is called on the form if I use data-role=”none”
<button data-role="none" id="upload" type="submit" name="upload">Upload Photo</button>
But the button obviously loses the mobile styles.
I have data-ajax=”false” at the form level as shown (thanks to CBroe!) , but that does not help.
Is there any option to get the jquery mobile styles on buttons, but leave the default Form events and submit/post behavior.
Where did you put that – on the button element, or on the form element? (It’s supposed to be set on the form.)