I am developing a windows app with an exit button to exit the app with a confirmation. The button is placed on the top of the app using html5, jquery-mobile, ajax, and phonegap. The problem is with me, I used the code that it's written below and is not working in windows app. Even the alert is not working.
So i used
var msg = new Windows.UI.Popups.MessageDialog("No image is selected");
msg.showAsync();
And it is working fine. Can anyone help me to find the problem out?
navigator.notification.confirm("Do you really want to close this app?", function (buttonIndex) {
ConfirmExit(buttonIndex);
},
"Confirmation",
"Yes,No"
);
function ConfirmExit(stat) {
alert("Inside ConfirmExit");
if (stat == "1") {
navigator.app.exitApp();
} else {
return;
};
};
The way you are calling the function, and the alert!
I haven't tried this but I think you may it a try
and there is
navifator.notification.alert
to alert a message