Lista
Lista

Reputation: 2246

window.print issues with iFrame and IE7

I'm using window.print() from inside an iFrame. This works flawlessly in FF, but not so great in IE7. In IE7, it brings up the Print Dialog, however, the dialog itself is slow, choppy and unstable.

I'm having troubles understanding this problem, and any help would be greatly appreciated.


If I may add, the same thing happens when printing content of the same iFrame from outside of the iFrame in question. Further more, when clicking File->Print the Print Dialog appears to function normally.

Upvotes: 0

Views: 2269

Answers (1)

gdub
gdub

Reputation: 41

Try using:

document.execCommand('print', false, null);

This appears to work in IE7, but you'll probably want to use a conditional and use window.print() for other browsers.

Upvotes: 4

Related Questions