I\'m trying to get a pop-up to, well, pop up when there is no internet connection on the device.
I got the following example working, but now I want the alert only to sh
That's because you are testing the truthiness of a constant. That type of test will always return true. What you want to use is:
if (navigator.network.connection.type == Connection.NONE]{ alert('Geen internet :('); };