title: Can I authenticate an iFrame page from the parent page?
body: <p>I have a simple HTML page that rotates through several status pages that I display on several tv's around campus. I regularly update the page and the links. Many times the pages require authentication. It is a pain to remote to ever terminal to supply credentials. Some are HTTP authentication and some are some <code>&lt;form&gt;</code> based authentication baked into the site. Many times I can get around the <code>&lt;form&gt;</code> based authentication with HTML and JavaScript that post the right credentials.</p>
  
  <ol>
  <li><p>Is there a better way to get around
  the <code>&lt;form&gt;</code> based authentication
  from the host page? (below)</p></li>
  <li><p>Is there any way to get around the
  Server/HTTP based authentication
  from the host page without having to
  manually authenticate on ever
  display?</p></li>
  </ol>
  
  <p>By <code>&lt;form&gt;</code> authentication I mean that a <code>&lt;form&gt;</code> action generates a session cookie?<br>
  ( mikerobi, thanks for the comment)</p>
  
  <p>Here is the code for the host page </p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head&gt;
  &lt;title&gt; 
    Important Stuff 
  &lt;/title&gt;
      &lt;script src="/scripts/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;style type="text/css"&gt;
          html, body, iframe { margin:0; height:100%; }
          iframe { display:block; width:100%; border:none; }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
          var link = new Array();        
          link[0] = "http://mycompany.intranet/";        
          link[1] = "http://mycompany.intranet/weather.htm";        
          link[2] = "http://mycompany.intranet/systemstatus/";        
          var linkIndex = 0;
          setInterval("doSomething()", 10000);
  
          function doSomething() {
  
              if (linkIndex &gt;= link.length)
              {
                  // reload in case the page has been updated
                  window.location.reload();
              }
  
              $("#frame").attr("src", link[linkIndex]);
              linkIndex++;
          }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;iframe id="frame" src="http://mycompany.intranet/"&gt;&lt;/iframe&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>