How do I print an IFrame from javascript in Safari/Chrome

Posted by Andrew Bullock on Stack Overflow See other posts from Stack Overflow or by Andrew Bullock
Published on 2009-01-23T13:53:08Z Indexed on 2010/05/26 16:11 UTC
Read the original article Hit count: 383

Filed under:


Can someone please help me out with printing the contents of an IFrame via a javascript call in Safari/Chrome.

This works in firefox:

$('#' + id)[0].focus();
$('#' + id)[0].contentWindow.print();

this works in IE:


But I can't get anything to work in Safari/Chrome.



© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about iframe