Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

can framesets be bookmarked or printed?

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
jim123052397
Asked:
jim123052397
  • 3
  • 2
  • 2
  • +3
3 Solutions
 
mcs1169Commented:
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
 
jim123052397Author Commented:
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
 
YZlatCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
mcs1169Commented:
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
 
frodomanCommented:
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
 
red010knightCommented:
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
 
jim123052397Author Commented:
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
 
jim123052397Author Commented:
also, frodoman - that doesn't address the printing problem.  any ideas there?
0
 
red010knightCommented:
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
 
ZontarCommented:
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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now