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!

URGRENT (Printing frame in both IE/NS , works in NS, not IE)

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I am trying to get a frame to get printed.

this is the command line that I am using
Code:
href="javascript:top.frames[1].frames[1].print();"
[tt]
---------------------------------------------
| Frame 0 |
| |
|-------------------------------------------|
||-----------------------------------------||
|| Frame 1:0 ||
||-----------------------------------------||
|| Frame 1:1 ||
|| I want to print this frame ||
||-----------------------------------------||
|-------------------------------------------|
| Frame 2 |
|--------------------------------------------
[/tt]

IE when using that script above will print frame 0, not 1:1
however netscape 4.73 will correctly print the frame I want.

(first time I ever had someone that works in NS, but not IE) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
i had the same problem, never solved it
(almost the same problem : was printing frame1 from frame2)
i've tried to put the print function in the frame i wanted to be printed (frame1), and call it from the "printer" frame (frame2), but it's not working either
i think it's because ie has a "print selected frame/print all frames" menu in the print menu - and wants us ti use this menu - not shortcuts ??
 
I was thinking the same thing, the IE's print dialog, shows a section for selected frames, so logically I thought, because I pushed the button on Frame 0, the IE print dialog, regardless of the window the print command came from, decided to print the frame that I last had focus on (oh btw can focus be set via javascript?) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
i tried to set the focus to the frame i wanted to be printed ... didn't work either ...
i finally got crazy with it and explained the client the print button was useless anyway, as all browsers have a print menu, and even if this button would look neat, it would not work on all browsers / platform (prior v4 they don't support the print function anyway !!)
 
well unfortunatly we cant tell that to the state of NC, prior to going to their Employment Security Commision show, or whatever it was they are going to in april to show off products we make for them.

(if you understand most state govt employee's and customers, they tend to strictly be stuck on visual things[if functionality is good to start with] , for example they'd rather something nice and pretty, that works, rather than something that seems crude but does the job 200% better) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
i know what you mean ... i didn't write the client agreed !!! so now he has print buttons (nice ones tho ;] ) everywhere and most of the time, as they use old browser, all what those buttons do is "to print this page, please go to the file menu and select print" - as you say, it's stupid, not doing the job correctly, but it's nice and pretty :-(
i have to go back home now - if i find a solution for you i'll post it here tomorrow morning (....14h from now !)
 
thanks for your help anyways, by the time you get home , my employer's will probally have me doing an old method of opening the frame into a new window then having the browser print it. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
ok, hope you ended up with a solution ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top