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

print other frame with button?

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
iv got a frame setting

left is "menu" and right is "content"

__________
| | |
| | |
| | |
|_|______|

in menu i want to have a print button, but the button has to print the content frame.

i know the print command is window.print() but how do i get it to print the content frame? content.print() doesnt seem to be working.... neither does top.print() which worked for top.close()

thanks,
 
Maybe try (?):

parent.content.print() Hope this helps.
Ciao, K----------------
"If you were supposed to understand it, we wouldn't call it code" - FedEx
 
nope, that just printed the option frame again...

i for got to mention that this framesetting is in a popup window called "info"

thnx
 
Looking a bit futher, I found this article, which offers a solution to your problem:

Apparently "parent.content.print()" would work in NN, but not in IE. IE will print only the frame which has focus (which your "content" frame will not have if the print button is located in the "menu" frame)

Short answer:
parent.content.focus()
parent.content.print() Hope this helps.
Ciao, K----------------
"If you were supposed to understand it, we wouldn't call it code" - FedEx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top