Linking to a Named Anchor Within a Frameset

So here's the problem: You've got a site that uses frames, and one of the pages contains several chunks of information, each with its own named anchor (e.g., <a name="foobar">) so that you can jump directly to each chunk. But, what do you do when you want to link directly to one of those named anchors, but you're not already in the frameset?

The links below take you into a demo that shows one way to solve this problem using JavaScript. What's happening is that the document containing the named anchors has some code in it that gets the URL of its parent, the frameset document. It then strips off the anchor piece of the URL and changes its own location to jump to that part of the page. View the source of the right-most document for more information.

« Back to my workshop.