0% found this document useful (0 votes)
15 views1 page

Notifications

The document shows how to create a simple Hello World PhoneGap app that uses alerts and confirm dialogs to display messages to the user.

Uploaded by

bilal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Notifications

The document shows how to create a simple Hello World PhoneGap app that uses alerts and confirm dialogs to display messages to the user.

Uploaded by

bilal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE HTML>
<html>
<head>
<title> HellowWorld PhoneGap App </title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
alert("PhoneGap loaded");
}
function myFunction()
{
alert("Hello World!");
}

function alertCallback(){
}

function onDoConfirm(button) {
alert("You selected button" + button);
}

function showAlert() {
navigator.notification.alert("Game Over", alertCallback,"Game Over", "Done");
}

// Show a custom confirmation dialog


//
function showConfirm() {
navigator.notification.confirm("Game Over!",onDoConfirm,"Game
Over","Restart,Exit");
}

</script>
</head>
<body>
<h1>Hello World</h1>
<button onclick="myFunction()">NormalAlert</button>
<button onclick="showAlert()">showAlert</button>
<button onclick="showConfirm()">showConfirm</button>
</body>
</html>

You might also like