Forum Moderators: open
Be sure to replace framename with the correct frame to load the new file in. If I remember right, this also does a nice job of disabling the back button.
function doTwo(pageA,pageB)
{
(parent.framename1.location=pageA);
(parent.framename2.location=pageB);
}
Then the links in the BODY section can look like this:
<a href="javascript:doTwo('newpage1.html','newpage2.html')">LINK - change both frames</a>
This should work whether you are changing the frame that contains the link itself, or two other frames in a multi-frameset.
ggrot's idea works for changing the frame content immediately onLoad - if that's what you need, then using the replace() method is a good idea.
But if you want to offer a link that changes two frames, I wouldn't use the replace() method. Back Buttons and frames are already confusing to the average user. The replace() method will change the history list, replacing the first state of the frameset with the new one. Then the Back Button won't take the vistor where they expected to go!