title: PhoneGap Script reads contacts correctly until I include photos (avatars)
body: <p>Following script is supposed to return a list of contacts together with their emails, phone numbers and avatars (photos).  </p>
  
  <p>It works like a charm it I remove the avatar (photo) retrieval code, the moment I add it back. The script breaks. Does anyone have any experiences trying to display contact photos via phonegap?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Contact Example&lt;/title&gt;
  &lt;script type="text/javascript" src="jquery-1.7.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8"&gt;
  
          // Wait for Cordova to load
          //
          document.addEventListener("deviceready", onDeviceReady, false);
  
          // Cordova is ready
          //
          function onDeviceReady() {
              // specify contact search criteria
              var options = new ContactFindOptions();
              options.filter="";          // empty search string returns all contacts
              options.multiple=true;      // return multiple results
              filter = ["displayName", "name", "phoneNumbers"];
  
              // find contacts
              navigator.contacts.find(filter, onSuccess, onError, options);
          }
  
          // onSuccess: Get a snapshot of the current contacts
          //
          function onSuccess(contacts) {
              console.log(contacts.length);
              for (var i=0; i&lt;contacts.length; i++) {
                  var LI=$("#list").append('&lt;li&gt;'+contacts[i].displayName+'&lt;/li&gt;');
                  if (contacts[i].phoneNumbers) {
                      for (var j=0; j&lt;contacts[i].phoneNumbers.length; j++) {
                          $(LI).append('&lt;span&gt;'+contacts[i].phoneNumbers[j].value+'&lt;/span&gt;&lt;Br/&gt;');
                      }
                  }
                  if (contacts[i].emails) {
                      for (var j=0; j&lt;contacts[i].emails.length; j++) {
                          $(LI).append('&lt;span&gt;'+contacts[i].emails[j].value+'&lt;/span&gt;&lt;br/&gt;');
                      }
                  }
                  if (contacts[i].photos) {
                      for (var j=0; j&lt;contacts[i].photos.length; j++) {
                          alert(contacts[i].photos[j].value);
                          //$(LI).append('&lt;span&gt;'+contacts[i].photos[j].value+'&lt;/span&gt;&lt;br/&gt;');
                      }
                  }
                  /*if (contacts[i].photos) {
                      for (var j=0; j&lt;contacts[i].photos.length; j++) {
                          $(LI).append('&lt;img src="'+contacts[i].photos[j].value+'"/&gt;&lt;br/&gt;');
                      }
                  }*/
              }
          };
  
          // onError: Failed to get the contacts
          //
          function onError(contactError) {
              alert('onError!');
          }
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Example&lt;/h1&gt;
      &lt;p&gt;All Contacts in a list&lt;/p&gt;
      &lt;ul id="list"&gt;
      &lt;/ul&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>