title: Javascript bookmarklet to take info from one page and submit it to form on another page
body: <p>Now that I discovered here that I can't write JavaScript within one page to enter form data on another external page, I'd like to do this with a browser-based bookmarklet instead. </p>
  
  <p>I'm able to access the data on my original page with this bookmarklet code snippet:</p>
  
  <pre><code>javascript:var%20thecode=document.myForm.myTextArea.value;
  </code></pre>
  
  <p>If I open the external Web-based form manually in the browser, this code changes what's in the text box:</p>
  
  <pre><code>javascript:void(document.externalForm.externalTextArea.value="HELLO WORLD"));
  </code></pre>
  
  <p>And this bookmarklet code will open a new browser window with the external form:</p>
  
  <pre><code>javascript:newWindow=window.open("http://www.url.com","newWindow");if(window.focus){void(newWindow.focus());}
  </code></pre>
  
  <p>However, when I try to put these snippets together in a single bookmarklet to open the external form in a new window and change the data inside, I can't access any of the elements in newWindow. For example, this doesn't work to check the existing value of the text area in the new window</p>
  
  <pre><code>javascript:var%20newWindow=window.open("http://www.url.com","newWindow");if(window.focus){void(newWindow.focus());}window.alert(newWindow.document.externalForm.externalTextArea.value);
  </code></pre>
  
  <p>Once I use the bookmarklet code to open the new window as newWindow, I don't seem to be able to access the elements within that new window. Any suggestions what I'm missing? Thanks.</p>