title: Javascript get element from opened window
body: <p>I need to open a new window and return an element contained in it.</p>
  
  <p>Say we have page A and page B, I want:
  <li> open B from A </li>
  <li> get the element interested in B </li>
  <li> return that element to A</li></p>
  
  <p>I tried to do so in this manner, but it doesn't work:</p>
  
  <pre><code>var newwindow = window.open("http://www.example.com");
  var elem = newwindow.document.getElementById('my-id').value;
  </code></pre>
  
  <p>Where am I wrong? Has anyone some advice to me?</p>