Input type Image will loose its POST data
Hello,
Thank you very much for the fantastic work on jQueryMobile.
Unfortunately, I am encountering a strange behavior with input type="image" on my pages.
I am using a tier application which creates dynamically pages depending on contect, something like a wizard. This tier application will let me apply Html templates so I can add reference to jQuery an jQueryMobile js and css:
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.css"/>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js">Default jQuery</script>
- <script type="text/javascript" src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.js">jQuery for mobile</script>
All seemed to work like a charm until I faced a generated page where user has to answer by clicking on one of proposed pictures. Of course, I had to add the following line to my template in order to keep my images as they should be displayed:
- <script type="text/javascript">
- $('input[type="image"]').attr('data-role','none');
- …
- </Script>
When I click on one of the image, I get the following in firebug/network trace WITHOUT jQueryMobile:
-
- Form Data
-
-
-
-
-
-
-
-
- Response Headers
-
- But when I click on one of the image WITH jQueryMobile loaded:
-
-
- Form Data
-
-
-
-
-
-
- Response Headers
-
- Information on which image has been clicked has just disappeared(_QGender). Of course the server logic of the tier app then answers that information has not been suplied.
- I have tried a lot of things found in forum, including adding a hiiden of type="submit" with no luck. What I have noticed is that it is not the same initiator. With jQueryMobile loaded, initiator of the submit/post command is "query-1.7.1.min.js:4", without jQuery, initiator is 'Other'.
- Can you please tell me what I can do to solve this problem?
- Thanks.
- Stylo.