getJson iphone4 issue

getJson iphone4 issue

I am in the middle of building this website for mobile/iphone well everything seemed to be going all ok, built a page using json data using the getJson function all ok on my 3G iphone, but when viewed on my colleague iphone 4, the code did not show?

There was no error nothing just did not run the code within the getJson function.

MY CODE:

  1.       //-- this log will show on both iphone 3G and 4
  2. console.log('begin json ');
  3.       //-- the log and code within will not show in iphone4 safari mobile but iphone 3g all ok
  4. $.getJSON('http://url/myjsonfile.json?callback=displayfile', function(n) {
  5. console.log('Json Loaded');
  6. //-- display list
  7. for($i=0; $i<n. info.length; $i++){
  8. var $r=n.info[$i]. title;
  9. $('#info-container').append('<a href="link.asp?id=' + $i + '" rel="external">' + $r + '</a><br />');
  10. }; //-- end loop
  11. });//-- end json


MY JSON FILE (myjsonfile.json)
(this is a fiel its not generated via php/aps ect)


  1. {"info": [ 
  2.   {
  3.   "title":  "TITLE GOES HERE",
  4.   "content": [ 
  5.   {
  6.   "text": "Text to go here",
  7.   "img": "image.jpg",
  8.   "imgby": "artist"
  9.   }
  10.   ]
  11.   },
  12.   {
  13.   "title":  "TITLE GOES HERE",
  14.   "content": [ 
  15.   {
  16.   "text": "Text to go here",
  17.   "img": "image.jpg",
  18.   "imgby": "artist"
  19.   }
  20.   ]
  21.   },
  22.   {
  23.   "title":  "TITLE GOES HERE",
  24.   "content": [ 
  25.   {
  26.   "text": "Text to go here",
  27.   "img": "image.jpg",
  28.   "imgby": "artist"
  29.   }
  30.   ]
  31.   }
  32. ]
  33. }

I have also tried this in a basic html page with just jquery and a little code no jquery mobile etc and still, ok on my 3G phone not in iphone4, also other browsers are ok as well.

Many Thanks
SI