Form submit from dialog page

Form submit from dialog page

Hi there

I'm new to jQM and love it so far, I think it's much better than Alpha right now :)

However, I ran into an error now that I can't find a solution on the web and I think my code is about right.

I open a dialog using a link:

  1. <a href="city.php" data-role="button" data-rel="dialog" data-transition="pop">open my dialog...</a>
Then on the dialog I have a form, the whole city.php looks like this:

  1. <div data-role="page" data-theme="a" id="cityPage">

        <div data-role="header">
            <h1>headertext</h1>
        </div><!-- /header -->

        <div data-role="content" data-theme="a"> 
        <form action="result.php" method="post" name="cityForm" id="cityForm">
          <div data-role="fieldcontain" data-theme="a">
            <input data-theme="a" type="text" name="city" value="Enter city" id="city" />
            <input data-theme="a" type="submit" value="Find!" id="find" />
          </div>
        </form>   
        </div><!-- /content -->

        <div data-role="footer" data-position="fixed">
            <h4>footertext!</h4>
        </div><!-- /footer -->
    </div>    

















Now what happens? On Firefox / Windows, everything works fine.
On Safari iOS and Safari / Windows, I receive the following error:


TypeError: Result of expression 'l.data("page")' [undefined] is not an object.


Error in file


code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js:46
...and the "loading" message never disappears.

What am I doing wrong?

Thank you very much for any help
Raphael





















    • Topic Participants

    • mail