Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing all frames

Status
Not open for further replies.

search66

IS-IT--Management
Apr 17, 2002
198
US
I've searched Google and the forums back to front, but the end result doesn't work.

I have a top frame (header.htm) and the bottom frame is created with a java applet; which brings up a third-party website.

What I'd like to do is be able to create a "print" button to print both frames onto one page. I've yet to find a way to do this. The best I've gotten it, is to print both pages on seperate sheets.

The problem is because I only have one self created frame, and the other is being pulled from another site. Any clues? Really appreciate it.
 
the best way is to give a link called printable version.. in that page make a single page with both the top and bottom content...

sounds stupid but that is the only way...

i have a question... how did u give the print command?

Known is handfull, Unknown is worldfull
 
Thanks for the help. How would I go about making a "printable version".

I had it print by changing the focus with javascript and setting my frameset...
 
Could you use something like this?

top.bottomFrame.document.body.insertAdjacentHTML("afterBegin",top.headerFrame.document.body.innerHTML);

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life--};
 
That sounds like it should work, how would I include that in my header to print though?
 
Oh... here is the code I'm using now:

<script language=&quot;JavaScript&quot;><!--
function printAll(where) {
if (where.frames.length == 0)
where.print();
else
for (var i=0;i<where.frames.length;i++)
printAll(where.frames);
}
if (window.print) {
document.write('<form><input type=&quot;button&quot; onClick=&quot;printAll(top)&quot; value=&quot;Print Frames&quot;><\/form>');
}
//--></script>
 
Maybe you can duplicate your header code in the bottom frame, but just hide it until you print. Then you'd only have to print the bottom frame.

<html>
<head>
<style>@media print{#divHeader{display:block}}</style>
</head>
<body>
<div id=&quot;divHeader&quot; style=&quot;display:none&quot;>
--Header code goes here
</div>
<object src=&quot;yourApplet&quot;></object>
</body>
</html>


Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life--};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top