can framesets be bookmarked or printed?

Posted on 2003-11-14
Last Modified: 2010-04-06
is is possible to bookmark entire framesets by using special code in ASP or HTML pages, perhaps by including CSS, JavaScript or something else in the code?

i am NOT looking to learn how to bookmark these pages myself, but to learn if some code or language can enable an uneducated user to "add the page to favorites" [THE ENTIRE FRAMESET].

if that's not possible, what IS possible, from the design perspective, to make something like this happen easily for the uneducated user? (without right-clicking or any other user-ended "tricks").

finally, can entire framesets (including all three logo, nav, and content "pages") be printed without screenshots?

thanks -
Question by:jim123052397
  • 3
  • 2
  • 2
  • +3

Expert Comment

ID: 9749116

The favorites are saved by URL so if your frameset is set as your home page (which I assume it is) then just set the favorites to the proper URL (

In regards to printing, in the print dialog (file/print), set the layout to print 'As Laid Out On Screen' instead on Print Selected Frame.


Author Comment

ID: 9749457
like i said in the question, i am NOT looking for instructions on how I can bookmark and print framesets.

to restate my question:
can any technology or languages be inserted into the code or on installed on our web server, so USERS can bookmark and print framesets without workarounds?
LVL 35

Expert Comment

ID: 9749814

To create a bookmark (with Netscape) in any frameset, position your cursor over the link you'd like to bookmark and hold down the mouse button. When the pop-up menu appears, choose Add Bookmark for this Link. Please note that if you choose to create a bookmark for the entire page, it
will bookmark the URL for the original frameset, which may not be the bookmark you meant to choose.  To create a favorite page (with Internet Explorer 3) select Favorites from the menu and then select Add to Favorites... it will bookmark the URL for the original frameset, which may not be the bookmark you meant to choose.


To print a page, select the frame you want to print by clicking in it. Then, from the File menu, select


Expert Comment

ID: 9749973

Sorry. I misread your question.


In the <HEAD> section:

<script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
var url = "";
var title = "This is the framset that I wanted to bookmark";

function makeLink(){

// -->

In the body:

<A HREF="javascript:makeLink()">Bookmark This Site</A>


<A HREF="javascript:window.print()">Click to Print This Page</A>

This will launch the print dialog. Give instructions as stated above.

LVL 42

Accepted Solution

frodoman earned 100 total points
ID: 9750091
The short answer is 'no' - you can't do anything so that when a user selects 'add bookmark' it will automatically bookmark your entire frameset.

The only idea I have to simulate this is to have your logo frame set a session variable and then put code on your content page to the effect that if this session variables isn't set, you can redirect to the appropriate page.  This isn't actually bookmarking a frame, but instead redirecting to the correct place if the other panels don't exist.
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails


Expert Comment

ID: 9750512
An additional comment about mcs1169 comment,

Make sure to have text by the link referencing the fact that javascript must be enabled for this to work.

or you may get complaints about the page not working.


Author Comment

ID: 9756044
and if i want to send an e-mail with a link to a content page - and have it appear in the original FRAMED format - is frodoman's answer the way to do that?  

in other words, will the session variable's not being set redirect the page to the original frameset page with the logo and nav frames?

Author Comment

ID: 9756089
also, frodoman - that doesn't address the printing problem.  any ideas there?

Assisted Solution

red010knight earned 100 total points
ID: 9759835
Yes and no. WHat you would have to do, is on the Frames page/link that it checks for a variable in the navigation such as:

Then in the coding of your frame page you would have to pass the variable to your nav page.
  $link="blah/blah.php?page=". $_GET['page'];

Once your nav page has it, rather than it auto calling up your main page it auto calls the 'displaypage'.
//repeat the blow for each nav link you have
    //this is where you will need to figure it out because I forgot how you make the frameset code.

I actually created a page that is an array of all pages I have and it depends on the variable I have set in the code. And whatever the number is, the code includes the appropriate page. And in cases of different layouts, I have it redirect to a group of them so as to minimize the work.

This allows for the pages to be bookmarked as well as the pages to take minimal load time because the browsers see the same page with just a different get var. So they only look for changes rather than recaching the whole page;-)

Hope this helps.

LVL 11

Assisted Solution

Zontar earned 50 total points
ID: 9804116
To make sure the entire frameset gets printed, use

<a href="javascript:top.print();">PRINT PAGE</a>

Of course the user can override this in the print dialogue...

Also note that addFavorite() only works in MSIE.

Personally, I'd ditch the frames. I almost never use framesets, precisely because they cause problems like these.

If your navigation and/or heading are so large that you need to worry about caching them, then it's time to rethink your design and to cut some bloat.

From a maintenance perspective, you can use server-side includes to duplicate content on many pages, and SSIs are easier to work with.

> browsers see the same page with just a different get var. So they only look for changes rather than recaching the whole page

Browsers don't cache partial pages, and they don't fetch partial pages from the server. Caching is good for discrete *files*. Either the browser thinks a file has changed and fetches a new copy of it from the server, or it doesn't.

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Shoutout to Emily Plummer ( for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to dynamically set the form action using jQuery.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now