I am new to phonegap.I want display dialogs in application.How can i display dialog .I have goggled for tutorials but i am not able to find.Please any one please give guidance or tutorials to display dialogs.Thanks in advance....
Asked
Active
Viewed 2,758 times
0
-
1Maybe try reading the Phonegap documentation first http://docs.phonegap.com/en/2.0.0/cordova_notification_notification.md.html#Notification – jb11 Sep 20 '12 at 10:27
4 Answers
6
Use
alert("on device ready!!!!");
or
navigator.notification.alert("PhoneGap is working");

Chirag
- 56,621
- 29
- 151
- 198
-
Thanks u so much.I am looking for dialog with image,button and text. – user1651572 Sep 20 '12 at 09:57
-
i got dialog with image,text and buttons.I have used REDIPS.dialog – user1651572 Sep 20 '12 at 10:46
3
You could use Fancybox javascript to do this:
You can create dialogs with everything you need inside.
1
I've made dialogs by using absolutely positioned <div> which show or hide depending whether dialog is open or closed.
In my index.html
<div id="hellodlg" class="dialog hidden">
Hello
<button class="closedlg">close</button>
</div>
<button class="openclosedlg">open/close</button>
in style
<style>
.dialog {
position:absolute;
left:50%; // position in the middle
margin-left: -5em; // move left so that dialog is in the middle
top: 2em;
width: 10em;
height:10em;
background:blue;
border: 1px solid black:
}
.hidden {
display:none;
}
</style>
in script using jquery (see how to add class without jquery)
<script>
// open dialog
$(".openclosedlg").click(function() { $(".dialog").toggleClass("hidden");});
// listen for button
$(".closedlg").click(function() { $(".dialog").addClass("hidden");});
</script>
0
Use JQM
as a designing framework which is most suitable companion for phonegap.

Abdulqadir_WDDN
- 658
- 6
- 22