I'm wondering how I can load an external page with a page and multiple dialogs.
//I am in index.htm, a multi-page file which will send a big object to anotherpage.htm
$.mobile.changePage(anotherPage.htm, {type:"post",data:formData})
This will make the post just fine and pass in the formData. However, the dialogs in anotherPage.htm are not available. If I access anotherPage.htm directly the page runs as expected. jQM is only loading in the first page found in anotherPage.htm as expected.
//anotherpage.htm
<div data-role="page" id="mypage">
<p id="something">Some thing</p>
<script>
//bind to the pageinit event to fire the email handling.
$("#something").live("click", function() {
$.mobile.changePage('#successDialog',{ transition: "pop", role: "dialog", reverse: false });
});
</script>
</div>
<div data-role="dialog" id="successDialog" >
<p>Success!</p>
</div>
<div data-role="dialog" id="failureDialog" >
<p>Failure!</p>
<a id="dialogClose" href="#" data-rel="back" data-role="button">Close</a>
</div>