title: Accessing fields of an iframe with javascript
body: <p>I read that the following should work in order to access the contents of an iframe with javascript:</p>
  
  <pre><code>document.getElementById("iframe_name").contentDocument
  </code></pre>
  
  <p>or</p>
  
  <pre><code>document.getElementyById("iframe_name").contentWindow.document
  </code></pre>
  
  <p>However, neither of those methods work for me. The iframe I am trying to access is a Google form that I created. It is a registration form that I created for my website. I want to do some calculation on some of the fields that the user types in then display it after the iframe. Accessing those fields using javascript is the best way I could think of. Why can't I access it? Is there maybe a better way to achieve my goal? Thank you.</p>