title: Javascript on iPhone Web App: JSON for loop not displayed
body: <p>I have the following code to display JSON results from an AJAX request as an unordered list. It works well enough in Safari but on Mobile Safari on the iPhone the raw data displays but the UL does not. In fact the for loop isn't triggered.</p>
  
  <pre><code>$("#results").append(data);
  
  var songdata = JSON.parse(data);
  
  var i = 0;
  
  for (i=0;i&lt;=songdata.total;i++)
  {
      alert(i);
      var songhtml = "&lt;ul&gt;&lt;li&gt;&lt;img src=\"" + songdata.data[i].artwork + "\" /&gt;&lt;/li&gt;&lt;li&gt;" + songdata.data[i].title + "&lt;/li&gt;&lt;li&gt;" + songdata.data[i].artist + "&lt;/li&gt;&lt;li&gt;" + songdata.data[i].length + "&lt;/li&gt;&lt;li&gt;" + songdata.data[i].listen + "&lt;/li&gt;&lt;/ul&gt;";
      $("#results").append(songhtml);
  
  }
  </code></pre>
  
  <p>I expect it's to do with an error of mine, thank you in advance...</p>
  
  <p>Ben</p>