Solved

How to print frames

Posted on 1998-07-29
3
152 Views
Last Modified: 2010-04-09
Does anyone know how to print all frames on a page from netscape.  I know the option exist in IE4 but some of my audience may have netscape.  Is there a java script or any code that will allow for this
0
Comment
Question by:mragg
[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
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 20 total points
ID: 1844953
You have two possibilities
1. if the framelayout must be one one page, you must recreate the files shown in a table and load that page - this is the ONLY way all frames can be on one printed page in netscape
2. If you just need to print the framecontents on separate pages, Netscape 4 supports the print() function.
A button to do it could look like this:

<FORM><INPUT TYPE="BUTTON" VALUE="Print all frames"
ONCLICK="if (self.print) for (i=0,n=top.frames.length;i<n;i++) top.frames[i].print();">
</FORM>

The line starting with ONCLICK is all on one line until ">

Michel
0
 

Author Comment

by:mragg
ID: 1844954
I don't understand.
My situation is that I have a frame header with colums that must match up to a frame containing content for the header.  
look at my diagram:
 --------------
 |   header   |  
 --------------
 |   content  |
 |            |
 |            |
 --------------
Both are in a table that align.  I need people to be able to print this on one page or else the content page doesn't make sense.
Thanks for the response.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1844955
If you use frames as in
<FRAMESET ROWS="100,*">
<FRAME SRC="header.htm">
<FRAME SRC="content.htm">
</FRAMESET>

there is currently no way to get Netscape to print these two files
-yes, they are on the screen at the same time but they are two separate files! -
on one piece of paper.
The user may press print-screen, paste it into a pint program and print that file but that is not what you want.

So to get the same effect, you have to create a new document, with a table set up the same way (or as near as possible) as the frames, containing the same data as in the header and in the contents.

So if Header.htm contains

<HTML>
<CENTER>
Now is the time for all good persons
</CENTER>
</HTML>

and Contents.htm contains

<HTML>
<CENTER>
to come the the aid of their browsers
</CENTER>
</HTML>

you will have to create a new document (let's call it printable.htm) containing

<HTML>
<CENTER>
<TABLE>
<TR>
   <TD><IMG SRC="transparent.gif" width=1 height=100></TD>
   <TD ALIGN="CENTER">Now is the time for all good persons</TD></TR>
<TR>
   <TD>&nbsp;</TD><TD ALIGN="CENTER">to come the the aid of their browsers</TD>
</TR>
</TABLE>
</CENTER>
</HTML>

and print this instead.

You may use a hidden frame to load it:

<FRAMESET ROWS="100,*,*">
<FRAME NAME="HEADER" SRC="header.htm">
<FRAME NAME="CONTENT" SRC="content.htm">
<FRAME NAME="HIDDEN" SRC="printable.htm">
</FRAMESET>
 
and print it with top.HIDDEN.print();

Hope this helped clarifiy it. (I know, the solution stinks, but that is life on the www sometimes, sigh)

Michel
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simple html dom php accessing table/cell  values 4 42
message Alert on an empty search 10 29
CSS Style Effect 2 18
Table doesn't show the lines! 3 24
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

733 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