Input type Image will loose its POST data

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:

  1. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.css"/>
  2. <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js">Default jQuery</script>
  3. <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:

  1. <script type="text/javascript">
  2. $('input[type="image"]').attr('data-role','none'); 
  3. </Script>

When I click on one of the image, I get the following in firebug/network trace WITHOUT jQueryMobile:

    1. User-Agent:
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4
  1. Form Dataview URL encoded
    1. I.Engine:
      engine2
    2. I.Project:
      HOME
    3. I.Session:
      jf6argsoog2ehpbdcp33qbwgji4qaaaa
    4. I.SavePoint:
      Gender
    5. I.Renderer:
      HTMLPlayer
    6. _QGender_Cr1.x:
      64
    7. _QGender_Cr1.y:
      51
    8. _QGender_Cr1:
      r1
  2. Response Headersview source
    1. Content-Encoding:
      gzip


  1. But when I click on one of the image WITH jQueryMobile loaded:
    1. User-Agent:
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4
    2. X-Requested-With:
      XMLHttpRequest
  2. Form Dataview URL encoded
    1. I.Engine:
      engine2
    2. I.Project:
      HOME
    3. I.Session:
      ywhoo4dtfpje2pawlrkarjijzm5aaaaa
    4. I.SavePoint:
      Gender
    5. I.Renderer:
      HTMLPlayer
    6. submit:
      submit
  3. Response Headersview source
    1. Content-Encoding:
      gzip
  4. 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.

  5. 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'.
  6. Can you please tell me what I can do to solve this problem?
  7. Thanks.
  8. Stylo.