Note that there are some explanatory texts on larger screens.

plurals
  1. POJquerymobile dialog using mobile.changepage doesn't work on second page
    primarykey
    data
    text
    <p>I have a dialog (not external html), which is displayed when I click on a button on the page, it works fine if the html containing the dialog is the first page to be accessed , but if that file is opened by clicking on an href from another page, the dialog doesn't show up when I click the button.</p> <p>Here is the code for the page containing the dialog ... The alert in the click event of the button is showing up even when this is the not the first page to be accessed, but the dialog doesn't show up.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Create Team&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Page starts here --&gt; &lt;div data-role="page" data-theme="b" id="page1"&gt; &lt;div data-role="header" id="hdrMain" name="hdrMain" data-nobackbtn="true"&gt; &lt;h1&gt;Test screen&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content" id="contentMain" name="contentMain"&gt; &lt;div id="fullnamediv" data-role="fieldcontain"&gt; &lt;label for="fullname" id="fullnameLabel" name="fullnameLabel"&gt;Team Name*&lt;/label&gt; &lt;input id="fullname" name="fullname_r" type="text" /&gt; &lt;/div&gt; &lt;div id="submitDiv" data-role="fieldcontain"&gt; &lt;a id="buttonSave" name="buttonSave" href="#" data-role="button" data-inline="true"&gt;Save&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- contentMain --&gt; &lt;div data-role="footer" id="ftrMain" name="ftrMain"&gt;&lt;/div&gt; &lt;script&gt; $("#page1").bind("pagecreate", function() { $('#buttonSave').click(function() { alert("aaaa"); $.mobile.changePage('#successdiv', { transition: 'pop', reverse: false, changeHash: true }); alert("after change"); return true; }); }); &lt;/script&gt; &lt;/div&gt; &lt;!-- page1 --&gt; &lt;div data-role="dialog" data-theme="a" id="successdiv"&gt; &lt;div data-role="header" data-theme="f"&gt; &lt;h1&gt;Error&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;p&gt;This is Page 2&lt;/p&gt; &lt;button type="submit" data-theme="e" name="successok" value="submit-value" id="successbutton"&gt;Close Dialog&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Page ends here --&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
 

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