Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app = {
- initialize: function(){
- this.bindEvents ();
- },
- bindEvents: function() {
- document.addEventListener("deviceready",this.onDeviceReady,false);
- },
- onDeviceReady: function(){
- alert("This is my first phonegap application");
- },
- submit: function() {
- //$.mobile.changePage("inbox.html");
- navigator.notification.alert("You have clicked the login button, now you will be redirected to a new page",app.alertDismiss,"Success Alert","Dismiss Me");
- //$.mobile.changePage("inbox.html");
- window.location = "inbox.html";
- },
- reset: function() {
- navigator.notification.alert("Are you sure you want to crear all the fields ?", app.alertDismiss,"Reset Alert","Dismiss Alert");
- },
- alertDismiss: function() {
- alert("The alert is dismissed");
- }
- };
- /* The error message is as follows
- The error message from firebug is
- TypeError: navigator.notification is undefined
- ...e clicked the login button, now you will be redirected to a new page",app.alertD... */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement