title: Can I access contents of an iframe from a subdomain if I use www. on the main domain?
body: <p>I'm trying to access and edit the contents of an iframe. The iframe points to a page on a subdomain on my own domain. This is the javascript code I'm using, although it doesn't really matter.</p>
  
  <pre><code>$('iframe').load(function(){
    $('div.code textarea.html').val($(this).contents()[0].html());
  });
  </code></pre>
  
  <p>When I run it it says I don't have permission to access example.domain.com from www.domain.com. So does it matter if the domain I try to access from has the www? Because my host does not allow me to not use www.</p>