title: Why does my Iframe lose its content when I execute JavaScript from within the frame to "slide" it's parent div?
body: <p>I am new to learning js and having a problem with the following:</p>
  
  <p>I have a custom block on my page that looks like this...</p>
  
  <pre><code>&lt;div id="chat"&gt;
    &lt;iframe src="/sites/all/libraries/webim/client.php?locale=en"
    height="100%" width="100%"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;
  
  &lt;div class="slider"&gt;
  &lt;a class="toggleup" href="#"&gt;Live Support&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And a function in my script.js file that looks like this...</p>
  
  <pre><code>jQuery(function() {
    jQuery(".toggleup").click(function(){
      jQuery("#chat").slideToggle("slow");
      jQuery(this).toggleClass("toggledown");return false;
    });
  });
  </code></pre>
  
  <p>The issue at hand is that client.php returns 2 variations of a page, both of which contain close buttons that execute:</p>
  
  <pre><code>javascript:window.close();
  </code></pre>
  
  <p>Which I have changed to:</p>
  
  <pre><code>javascript:window.parent.jQuery('.toggleup').click()
  </code></pre>
  
  <p>When the JavaScript is executed, the chatbox slides closed as it should, but then all I see is:</p>
  
  <pre><code>[object Object]
  </code></pre>
  
  <p>where my Iframe content should be.</p>
  
  <p>What am I doing wrong?</p>