JavaScript - iPad app notification

Apologies for the rudimentary question, however the problem is that I cannot find what could be considered a simple yes or no.

I have a basic application that loads into a webIUView (I believe this is the correct terminology) in an iPad application.

I'm just trying to make an alert in my app, testing on the desktop (safari / chrome / etc) works as expected. However, as soon as I launch the iPad app, my alerts don't happen.

The investigation tells me that phonegap has a notifier ( http://docs.phonegap.com/en/1.0.0/phonegap_notification_notification.md.html ), however I really don't want to use another framework just for alert.

I am guessing my first question is why is a simple warning not working on iOS? Secondly, if it doesn't, should I just make a simple dialog that mimics it?

Thanks in advance.

Edit: Code example

I noticed this when I implemented the network connection handler

    window.addEventListener("offline", function(e) {
        onNetworkChange(false);
    });
    window.addEventListener("online", function(e) {
        onNetworkChange(true);
    });

    function onNetworkChange(_isConnected){
        var msg;
        (_isConnected == false) ? msg = "Networking Connection Lost" : msg = "Network Connection Established";

        window.alert (msg);

    }

      

Since I wasn't sure if the problem was with my code, in a different view I decided to do a simple

    window.alert ('test');

      

And nothing, I must either go crazy, or forget something.

+3


source to share


1 answer


I don't believe iOS Safari fires events online

and offline

. You can learn more about iPad status status issues here:



http://ednortonengineeringsociety.blogspot.com/2010/10/detecting-offline-status-in-html-5.html

+1


source







All Articles