Programmatically open a dialog as a popup using jQuery Mobile

So, I have a page and a dialog. When the user clicks the page button, one AJAX request opens a dialog with the results. Something like this simple example without AJAX: http://jsfiddle.net/rBBpx/

It works. The dialog box opens programmatically. But it hides the contents of the page, showing a dialog as if it were another page. I know that a pop-up window can open dialogs on a page with links, but I did not understand how to do this programmatically. I tried changing the call $.mobile.changePage()to this, but it did not work as I expected:

$('#dialog').popup();
$('#dialog').popup('open');

How can I show this dialog on the page as a popup? Is it possible? Thank you in advance!

+5
source share
1 answer

If you use phone disassembly, there is a warning plugin: http://docs.phonegap.com/en/edge/cordova_notification_notification.md.html

navigator.notification.alert("your AJAX result here");
-2
source

All Articles