window.focus() is needed before calling window.print() in IE(in frames)
843835Nov 21 2001 — edited Jul 31 2002window.focus() is needed before calling window.print() in IE(in HTML frames).
I had two frames(frame1 & frame2) and in the first frame i had a "Print" href link and when i click on it, i am supposed to print the content of the frame2 which sits near to frame1.
When i called parent.frame2.print(), it was printing the frame1 content instead of frame2 content in IE. It did work correctly in NE. Then we figured it out that it needs focus using parent.frame2.focus() and then tried the print() method.
parent.frame2.focus();
parent.frame2.print();
It worked this time.....Hope it saves some time for u guys.