title: alert not working in html in phonegap
body: <p>I am trying this code in which alert should be displayed once application in loaded successfully in iphone. But this is not working. This is phonegap application and this application is index.html.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;navigator.network.connection.type Example&lt;/title&gt;
  
          &lt;script type="text/javascript" charset="utf-8" src="js/phonegap-1.3.0.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" charset="utf-8"&gt;
  
              // Wait for PhoneGap to load
              // 
              document.addEventListener("deviceready", onDeviceReady, false);
  
              // PhoneGap is loaded and it is now safe to make calls PhoneGap methods
              //
              function onDeviceReady() {
              checkConnection();
              }
  
              function checkConnection() {
                  var networkState = navigator.network.connection.type;
  
                  var states = {};
                  states[Connection.UNKNOWN]  = 'Unknown connection';
                  states[Connection.ETHERNET] = 'Ethernet connection';
                  states[Connection.WIFI]     = 'WiFi connection';
                  states[Connection.CELL_2G]  = 'Cell 2G connection';
                  states[Connection.CELL_3G]  = 'Cell 3G connection';
                  states[Connection.CELL_4G]  = 'Cell 4G connection';
                  states[Connection.NONE]     = 'No network connection';
  
                  alert('Connection type: ' + states[networkState]);
                  //navigator.notification.alert('Connection type: ' + states[networkState]);
              }
  
              &lt;/script&gt;
      &lt;/head&gt;
      &lt;body &gt;
          &lt;p&gt;A dialog box will report the network state.&lt;/p&gt;
            &lt;a href="javascript:checkConnection()"&gt;Click&lt;/a&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>