title: JavaScript: history.back() in two frames on the same web page
body: <p>I want to add a back button in each of the two frames of a web page
  after some research I used this code:</p>
  
  <pre><code>&lt;button onclick="parent.frames.frame_1.history.back();"&gt;Back&lt;/button&gt;
  </code></pre>
  
  <p>But, after I click on something, for example a link on frame_1, and I click something else on frame_2, then I click my back button in frame_1, the code in the onClick event is executed in the frame_2 and not frame_1!</p>
  
  <p>so can I add a back button to both of my frames without one affecting the other?</p>