Solved

can framesets be bookmarked or printed?

Posted on 2003-11-14
10
413 Views
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 -
jim
0
Comment
Question by:jim123052397
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 1

Expert Comment

by:mcs1169
ID: 9749116
Jim,

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 (http://www.someframeset.com).

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.

Mitch
0
 

Author Comment

by:jim123052397
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?
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9749814
BOOKMARKING A FRAME

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.


PRINTING A PAGE

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

0
 
LVL 1

Expert Comment

by:mcs1169
ID: 9749973
Jim,

Sorry. I misread your question.

BOOKMARKING:

In the <HEAD> section:

<script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
<!--
var url = "http://www.someframeset.net";
var title = "This is the framset that I wanted to bookmark";

function makeLink(){
if(document.all)
window.external.AddFavorite(url,title)
}

// -->
</script>

In the body:

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

PRINTING:

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

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

Mitch
0
 
LVL 42

Accepted Solution

by:
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 frameset.com page.  This isn't actually bookmarking a frame, but instead redirecting to the correct place if the other panels don't exist.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:red010knight
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.

Red010Knight
0
 

Author Comment

by:jim123052397
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?
0
 

Author Comment

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

Assisted Solution

by:red010knight
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:
/myFrame.php?page=displaypage

Then in the coding of your frame page you would have to pass the variable to your nav page.
<?php
if(isset($_GET['page'])){
  $link="blah/blah.php?page=". $_GET['page'];
}else{
  $link="blah/blah.php";
}

Once your nav page has it, rather than it auto calling up your main page it auto calls the 'displaypage'.
if(isset($_GET['page'])){
  $goTo=$_GET['page'];
//repeat the blow for each nav link you have
  if($goTo="blah"){
    //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.
Red010Knight

0
 
LVL 11

Assisted Solution

by:Zontar
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 count occurrences of each item in an array.

863 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

28 Experts available now in Live!

Get 1:1 Help Now