The issue that you describe is one of many problems with using frames.

As Richard stated already, you can use JavaScript in these "sub" pages 
which can then redirect to the main document.  Taking it one step 
further, you can then use the document.referrer property in JavaScript 
in the main page to see if the main page has been redirected from one of 
the subpages.  You can then have JavaScript load the redirected frame so 
that the user doesn't lose the context of where they were.

But I would also recommend that you take a look at using CSS to mimic 
the functionality of frames.  You will need to overcome a few "quirks" 
in the various browsers to get it to work successfully (i.e. use 
JavaScript to set specific styles based on the browser being used by the 
client).  Do a search on "CSS" and "frames".  Here's a starting place:

Note, especially, the examples on the "layout" section in the middle on 
the page.

Good luck.


Amy McCrory wrote:
> This is an HTML-related problem, with I hope a straightforward solution 
> from someone with a good knowledge of frames.
> Borrowing heavily from Michael Fox's eadcbs7.xsl and Chris Prom's 
> Illinois.xsl, I've created a multi-"page" finding aid with a persistent 
> table of contents.  The output files generated by the XSLT all take the 
> <eadid> value as their base name, with various extensions appended:
> SPEC.CGA.TMf.html (the frameset)
> SPEC.CGA.TMt.html (the table of contents)
> SPEC.CGA.TMb.html (the body of the finding aid)
> SPEC.CGA.TMseries1.html (the first series)
> SPEC.CGA.TMseries2.html
> etc.
> Here's the problem: an open Web search of key terms from the finding aid 
> lands the searcher on a page such as SPEC.CGA.TMb.html or 
> SPEC.CGA.TMseries2.html, and the page in question appears without the 
> frameset.  This means that many of the finding aid's navigation links 
> are lost.
> Is there a better way of coding the HTML, so that the frameset always 
> appears with any of the pages?
> ----------------------------------------------------------------------
> Amy McCrory
> Digital Imaging Specialist, Preservation Department
> 228 Thompson Library, 1858 Neil Avenue
> The Ohio State University Libraries
> Columbus, OH 43210
> (614) 292-8647