title: iframe: How can we change iframe src from inside iframe itself?
body: <p>I know there are question have been asked around resembling to this one, but still I am not getting proper concept of this. I am currently loading an iframe through javascript in following manner:  </p>
  
  <pre><code>jQuery('.out-div-login').html("&lt;iframe id='parent' frameBorder='0' width='320' height='500' src='"+_url+"'&gt;&lt;/iframe&gt;");  
  </code></pre>
  
  <p>Which is working fine. (its cross domain). After loading my application inside given iframe, I want to come back to original state where <code>.out-div-login</code> was loading iframe into parent html.<br>
  From outside of iframe I can do this by accessing iframe using its <code>id</code> attribute, but not from the inside. Is there any way I can reload the iframe by giving its src again ? or by above code but from inside the iframe ? Thanks.<br>
  <strong>Update</strong><br>
  I have tried below code without any success as of now:  </p>
  
  <pre><code>var ifr = $('iframe[id="parent"]');  
  </code></pre>
  
  <p>from one of js file inside <code>iframe</code> with id <code>parent</code>. when I do <code>console.log(ifr)</code> it gives in firebug something like this <code>Object[]</code> instead of <code>&lt;iframe id="parent"&gt;</code></p>