jQueryPlugins
jQueryPlugins copied to clipboard
PRINT ON IE8 AJAX CONTENT WITH IFRAME METHOD
Just noticed this on plugins.jquery.com
Submitted by aiecoucou on May 28, 2010 - 7:54pm
Project: jQuery Print Element
Version: 1.1
Component: Code
Category: bug report
Priority: normal
Assigned: Unassigned
Status: patch (code needs review)
I had some problems to print a content from ajax with iframe method, i found a solution mayby this can help you :
i replaced the line :
html.push('function printPage(){focus();print();' + ((!$.browser.opera && !opts.leaveOpen && opts.printMode.toLowerCase() == 'popup') ? 'close();' : '') + '}');
by this line :
html.push('function printPage(){focus();try { document.execCommand(\'print\', false, null); } catch(e) {window.print();}' + ((!$.browser.opera && !opts.leaveOpen && opts.printMode.toLowerCase() == 'popup') ? 'close();' : '') + '}');
it's seems to work for me...
I had this exact same issue with version 1.2 , This edit fixed it for me.
for reference: http://bytes.com/topic/misc/answers/629926-ie7-printing-iframe-solution