title: show only one div within an iframe (javascript, JQuery...)
body: <p>First just let me say I'm open to ideas on a different approach altogether.</p>
  
  <p>I have and iframe as such:</p>
  
  <pre><code>&lt;div id="testloadlogin"&gt;
        &lt;iframe src="../security/login.aspx" width="400" height="500"
               scrolling="auto" frameborder="1"&gt;
        [Your user agent does not support frames or is currently configured
        not to display frames. However, you may visit
        &lt;a href="../security/login.aspx"&gt;the related document.&lt;/a&gt;]
        &lt;/iframe&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The page being loaded with the iframe has a div called loginInnerBox. I only want to display the loginInnerBox and everything inside of it.</p>
  
  <p>Any ideas on how to do this? I was thinking of using Jquery or javascript of some kind to remove everything else on the page loaded by the iframe, not sure how to access that though...</p>
  
  <p>Just to be clear I want everything on my page outside of the iframe to remain intact. I want the equivalent of saying $.('testloadlogin').load('../security/login.aspx' #loginInnerBox) which would just get loginInnerBox's html and place it in the testloadlogin div. However I need the back-end processing from the other page which is supported by iframe, but not by the Jquery load.</p>
  
  <p>The markup of the page loaded by the iframe is </p>
  
  <pre><code>&lt;body&gt;
      &lt;div&gt;
      &lt;/div&gt;.......
      &lt;div class="AspNet-Login" id="ctl00_CLPMainContent_Login1"&gt;
          &lt;div id="loginInnerBox"&gt;
              &lt;div id="loginCreds"&gt;
                  &lt;table&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div&gt;
      &lt;/div&gt;....
  &lt;/body&gt;
  </code></pre>
  
  <p>Do you need more information than that?</p>
  
  <p>I tried this, it had no effect:</p>
  
  <pre><code>&lt;div class="ui-corner-all" id="RefRes"&gt;
          &lt;div id="testloadlogin"&gt;
          &lt;iframe onload="javascript:loadlogin()" id="loginiframe" src="../security/login.aspx"
               scrolling="auto" frameborder="1"&gt;
        [Your user agent does not support frames or is currently configured
        not to display frames. However, you may visit
        &lt;a href="../security/login.aspx"&gt;the related document.&lt;/a&gt;]
        &lt;/iframe&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript"&gt;
          function loadlogin() {
              $('&lt;body&gt;*', this.contentWindow.document).not('#ctl00_CLPMainContent_Login1').hide();
          }
      &lt;/script&gt;
  </code></pre>