Forum Moderators: open
Where are you running into difficulties in making that script work?
Tedsters script tells the parent (or container) frame to change the location of framename1 and framename 2 to the locations specified (pageA and pageB).
What you need to do is give each of your frames a unique name, replace framename1 and framename2 with the frames that you want to change. In your anchor, change pageA and pageB to the URL that you want.
Do you have multiple framesets? IE, does your left frame contain further nested frames?
So, I'm guessing that the 3 frames that you have mentioned are all part of one frameset, and using tedsters function from the post you mentioned above:
function doTwo(pageA,pageB)
{
(parent.leftFrame.location=pageA);
(parent.mainFrame.location=pageB);
}
We want to load black1.htm into the frame called leftFrame and we want to load black2.htm into the frame called mainFrame on one click (of a link in navFrame):
<a href="javascript:doTwo('black1.htm','black2.htm')">
The link is now running the function doTwo when the user clicks on it. The link is feeding two variables into the function (black1.htm and black2.htm), which (looking at the function), is changing the location of the frames.
Does this help?
All this code would go in the frame that contains the link, in this case navFrame.
So, between your <head> and </head> tags you would put:
<script type="text/javascript">
function doTwo(pageA,pageB) {
(parent.leftFrame.location=pageA);
(parent.mainFrame.location=pageB);
}
</script>
And in the html in your <a>nchor tags you would call the function as described above.
HTH