title: Alert box when no internet connection - Phonegap
body: <p>I'm trying to get a pop-up to, well, pop up when there is no internet connection on the device.</p>
  
  <p>I got <a href="http://docs.phonegap.com/en/1.0.0/phonegap_connection_connection.md.html" rel="noreferrer">the following example</a> working, but now I want the alert only to show when the result is "No network connection".</p>
  
  <p>I tried this:</p>
  
  <pre><code>if (states[Connection.NONE]){
         alert('Geen internet :(');
         };
  </code></pre>
  
  <p>But that just makes the alert-box pop up, no matter if there is a connection or not.
  Who can help me? :)</p>