Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As stated, loading pages through ajax is the default behavior of jQm. Using <code>rel="external"</code> <em>does</em> work for links, but it is actually meant for links that are external to the scope of your mobile app (like visiting a "main" non-mobile site hosted on the same domain), and it does not work for form submissions. For individual links that are <em>in scope</em> to your mobile app and/or form submissions, adding the attribute <code>data-ajax="false"</code> is the recommended approach.</p> <p>So, for <strong>individual links</strong>, you would do this:</p> <pre><code>&lt;a href="/nonMobileHome" rel="external"&gt;Full website (non-mobile)&lt;/a&gt; &lt;a href="/user/edit/5" data-ajax="false"&gt;Load mobile page without ajax&lt;/a&gt; </code></pre> <p>For a <strong>form submission</strong>, use:</p> <pre><code>&lt;form action="/user/edit/5" method="post" data-ajax="false"&gt; </code></pre> <p>For <strong>all links/forms on a page</strong>, add this javascript to your page, <strong>before</strong> you load jQuery Mobile:</p> <pre><code>$(document).bind("mobileinit", function () { $.mobile.ajaxEnabled = false; }); </code></pre> <p>I've found that it's easiest within ASP.NET MVC to just disable jQm's ajax loading behavior globally, by including the javascript statement above in a site-wide js file. Unfortunately this problem still persists in MVC4 and Visual Studio 2012, even though Microsoft includes a jQuery Mobile MVC4 template by default.</p> <p>More information on suppressing ajax loading in jQuery Mobile: <a href="http://jquerymobile.com/test/docs/pages/page-links.html" rel="nofollow">http://jquerymobile.com/test/docs/pages/page-links.html</a><br> <a href="http://jquerymobile.com/test/docs/forms/forms-sample.html" rel="nofollow">http://jquerymobile.com/test/docs/forms/forms-sample.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload