title: fetching json from iframe -- not jsonp
body: <p>How can i get json from an iframe, it is not jsonp here is what i have. (using javascript only of course)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var theFrame = document.getElementById('iframe');
              var theWin = theFrame.contentWindow;
              var theDoc = theFrame.contentDocument || theFrame.contentWindow.document;
  var json = theDoc;
  var msgs = JSON.parse(theDoc);
  
  for (var i = 0, l = msgs.length; i &lt; l; i++) {
      var msg = msgs[i];
      var div = document.createElement('div');
      div.innerHTML = 'Hello ' + msg.user + ' your Id is: ' + msg.ID + 'and your message is: ' + msg.message + ' it has ' + msg.replies + ' replies';
      document.body.appendChild(div);
  
  &lt;/script&gt;
  
  &lt;iframe id="iframe" name="iframe" src="http://jsonsource.com/not/jsonp/" width="100" height="100"&gt;
    &lt;p&gt;Your browser does not support iframes.&lt;/p&gt;
  &lt;/iframe&gt;
  </code></pre>