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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing without the frame

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
I have a question. If I have 3 frames in my page, how can I print the content page without those two other frames. Is there a property where I can set, or some kind of function. Thank you!!!
 
I think that the only option is to open the desired frame document sepatately (in popup window) and then print it.
Here's how to do it:

<a href=&quot;javascript:printIt()&quot;>print this page</a>

function printIt() {
url = parent.frameName.location.href; //get URL of the desired frame
a = window.open(url,&quot;print&quot;,&quot;location=no,scrollbars=no,menubar=no,toolbar=no,width=200&quot;);
a.print();
}

Place this function to the <head> of your frameset, or attach it in external .js file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top