Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery + PhoneGap - Custom Notification Alerts
    primarykey
    data
    text
    <p>I've been spending some time trying to find out why I can't get my custom notifications on my app to work.</p> <p>Below is the code in my .js:</p> <pre><code>if (inputOne &gt; maxAllowed) { showMessage("Your Input is too high.",null,"Warning","Warning"); } </code></pre> <p>Below is the code in my .html:</p> <pre><code>document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { // Now safe to use the PhoneGap API } function showMessage(message, callback, title, buttonName) { title = title || "Warning!"; buttonName = buttonName || 'Warning!'; if(navigator.notification &amp;&amp; navigator.notification.alert) { navigator.notification.alert( message, // message callback, // callback title, // title buttonName // buttonName ); } else { alert(message); } </code></pre> <p>In my config.xml for PhoneGap I have:</p> <p></p> <p>Below is the link I was using to get this:</p> <p><a href="http://docs.phonegap.com/en/2.9.0/cordova_notification_notification.md.html#Notification" rel="nofollow noreferrer">http://docs.phonegap.com/en/2.9.0/cordova_notification_notification.md.html#Notification</a></p> <p>What happens is, it just uses the <code>else</code> part and works normally.</p> <p>The .html is from the below link:</p> <p><a href="https://stackoverflow.com/questions/9432615/custom-javascript-alerts-in-ios-using-phonegap-html">Custom JavaScript alerts in iOS using PhoneGap HTML</a></p> <p>Any ideas please?</p> <p>Thank you, any help is appreciated.</p> <p>Kind Regards,</p> <p>Gary Shergill</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload