title: Change the URL of the frame using Javascript
body: <p>I have got 2 frames in my page <code>frame1</code> and <code>frame2</code>. Frame 2 is displaying a html page called <code>rightpage.html</code>. So when I click the <code>rightpage.html</code> on <code>frame2</code> it needs to change the URL of <code>frame1</code> URL to <code>toppage.html</code>.</p>
  
  <pre><code>&lt;html&gt;
      &lt;frameset cols='45%,55%'&gt;
          &lt;frame src='leftpage.html' name='frame1' id='frame1' frameborder='0'&gt;
          &lt;frame src='rightpage.html' name='frame2' id='frame2' frameborder='0'&gt;
      &lt;/frameset&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Could you please help?</p>
  
  <p>Thanks in advance.</p>