I am trying to use the alert
method, so the native iOS like alertView will popout. Everything works fine, and the alert gets displayed. But the Heading of the Alert is always index.html
.
How can i edit the heading of the alert
method
You'll want to use navigator.notification.alert() from the PhoneGap API instead. It will allow you to set a title on your alert box.
If you don't want to refactor your code, you can override the alert() method with a notification :
window.alert = function (txt) {
navigator.notification.alert(txt, null, "Alert", "Close");
}
You can custumize the window title : "Alert, and the close button : "Close"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With