title: JQuery - Write to opener window
body: <p>I have an HTML page that opens another page via JavaScript. When a user clicks a button in the other page, I want to post a message in a DIV of the opening page via JQuery. I cannot put my finger on it, but I cannot seem to get this to work.  Here is my opener page</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;input type="button" onclick="window.open('dialog.html', '_blank', 'height=200, width=300');" value="launch!" /&gt;
      &lt;div id="testDiv"&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When the user clicks the "launch!" button, a dialog will appear. The code for the dialog looks like this:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;input type="button" onclick="updateOpener()" value="Update Opener" /&gt;
      &lt;script type="text/javascript"&gt;
        function updateOpener()
        {
          var testDiv = window.opener.jQuery("#testDiv");
          if (testDiv != null) {
        alert("here");
        testDiv.html("Updated!");
          }
        }
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Surprisingly, the alert box appears. However, I cannot seem to update the HTML of the DIV in my opening page. Does anyone know how to do this?</p>