Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

can framesets be bookmarked or printed?

Posted on 2003-11-14
10
Medium Priority
?
421 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 400 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
 
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 400 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

705 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