title: Can I change an iFrame's source from within?
body: <p>This is a question that I'm having trouble wording clearly; read carefully. I want to know whether or not it's possible for the source of an iFrame (the page displayed via the iFrame) to change it's inner source without changing the source of the iFrame's parent page.</p>
  
  <p><strong>For example:</strong></p>
  
  <p>If I create an iFrame in my web page, and click a traditional link within the iFrame, the source (location) of the master page (the page where I've created the iF) will be changed rather than the iFrame's content. 
  <hr>
  I want, instead, to change the source of the iFrame via the framed content (this <em>could</em> be <strong>cross-domain</strong> content) to a new location <em>within</em> the frame itself.</p>
  
  <blockquote>
    <p>I've noticed different behaviors in JS methods of changing a page's
    location. <a href="https://stackoverflow.com/questions/3846935/how-to-change-page-from-within-javascript">This SO question</a> has a few of them detailed. Some methods of
    changing the page behave differently, I noticed, such as not allowing
    the user to use the back button to get to the page that the user
    navigated from.</p>
  </blockquote>
  
  <p>Using one of these different JS location changing methods, I thought this could be possible, but I'm not sure how it would be done.</p>
  
  <p><strong>The question:</strong></p>
  
  <p>Provided that the iFrame's requested web page is cooperating with it, is it possible to achieve the result of an iFrame resource changing its own location? If so, how is it done?</p>