FAQ Topic - Why does framename.print() not print the correct frame in IE? (2010-08-22)

  • Follow


-----------------------------------------------------------------------
FAQ Topic - Why does framename.print() not print the correct
frame in IE?
-----------------------------------------------------------------------

IE prints the frame that has focus when you call the print
method `frameref.focus();frameref.print();`

<URL: http://msdn.microsoft.com/en-us/library/ms976105.aspx>


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

-- 

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

0
Reply javascript4 (1176) 8/21/2010 11:00:03 PM

FAQ server wrote on 22 aug 2010 in comp.lang.javascript:

> -----------------------------------------------------------------------
> FAQ Topic - Why does framename.print() not print the correct
> frame in IE?

This is not about a framename, but about a framepointer.


> -----------------------------------------------------------------------
> 
> IE prints the frame that has focus when you call the print
> method `frameref.focus();frameref.print();`

==============
IE illogically prints the frame that has focus when you call the print
method `frameref.print();` 

To ensure the right frame do `frameref.focus();frameref.print();`
==============

Is this what is ment?





===============================================================


Wouldn't it be beter to be more explicit? [only winsows tested]

====== in frame (1) ========
<button onclick = 'top.frames[0].print()'>
print frame 0 </button>
============================
.... will print frame (0) in Safari and Firefox,
but frame (1) in IE,
and do nothing in Chrome. 

====== in frame (1) ========
<button onclick = 'top.frames[0].focus();top.frames[0].print();'>
print frame 0 </button>
============================
.... will correct this for IE.


===============================================================

btw, what's wrong with Chrome?



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0
Reply Evertjan 8/22/2010 8:28:42 AM


1 Replies
217 Views

(page loaded in 0.117 seconds)


Reply: