title: Loading the contents of an iframe with jQuery
body: <p>I am trying to load the entire content of a child iframe upon some action in the parent frame. I am using jQuery and I am trying to avoid using <code>&lt;form&gt;</code> tag, setting up bunch of hidden <code>&lt;input&gt;</code> tags and submitting it. instead, I want to use something similar to jQuery's:</p>
  
  <pre><code>.load(url, data,function(response){...})
  </code></pre>
  
  <p>or perhaps</p>
  
  <pre><code>.post(url, data,function(response){...})
  </code></pre>
  
  <p>so far I tried the 'post' method and tried to use jQuery's <code>.contents()</code> method to change the contents of my iframe with the response that I get but the problem is that i need to change the entire content (ie the whole document) of the iframe and <code>.contents()</code> method returns the document object of the iframe. all I can do is to change the content of the document (ie say <code>&lt;head&gt;</code> or <code>&lt;body&gt;</code>). note that my iframe initially has no <code>src</code> attribute so initially there is no content to it.</p>