Sunday, January 10, 2010

Check Internet Connection in iPhone

Here is a quick code snippet for you. In a Dashcode javascript application, you can check if the user is connected to the internet via the following code:


  var online = window.navigator.onLine;
  if (!online){
    alert('You are not currently connected to the internet. Please try again later.');
  }

No comments:

Post a Comment