Click to See Complete Forum and Search --> : Back from updating two frames


mknutsson
10-21-2003, 01:08 AM
Hi.

I have a page built up by five frames. Two are of importance: f_name and f_main.

- In f_name the name of the current section is displayed, e.g. "Links".
- In f_main the "real" contents of the page is displayed, e.g. the links.

The page consists of several sections built up this way. When changing section, this code is used:

function changeSection(section)
{
parent.f_name.location.replace(contents[section].pathName);
parent.f_main.location.replace(contents[section].pathMain);
}

Here's my problem:
- Using the "replace" method erases history, so the "Back" functionality doesn't work.
- Omitting the "replace" method updates history for both the name frame and the main frame. This means that, when pressing back, only the main frame is backed. Pressing back again, and the name frame is backed also.
- Using "replace" on only one of the frame updates will not work - it seems that history isn't refreshed until after the function has ended
- Linking to an index file that rebuilds everything will work - but the entire frameset is reloaded, which is ugly.

What I want is a script that updates "Back" so both frames are backed at once. Anyone who can help me?