mragg
asked on
How to print frames
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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> </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
<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> </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
ASKER
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.