-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE printing entire page instead of element #36
Comments
I'll have a look. Got a link to the problem by chance? |
Not one that I can share unfortunately, no. It's just interesting that I can correctly alert the correct innerHTML of the div I want to print, but then it errors on printing in IE only. I'll try a few more tricks and let you know if I come up with a workaround. |
I'm pretty stumped on this one. I created a really simple "testing printing" element outside of the main content area and it's still trying to print the entire page in IE 8 and IE9. I'm now thinking this may be a problem with https versus http though, as I can run it locally on the same database with http and it will print the element fine. However in my other environment which uses SSL, it errors and prints the entire page. Will continue investigating this.. |
Thanks for the update.. |
Just FYI - I wasn't able to figure out what was going on with your plugin. However, the following "print element" solution works for me in all instances so we have switched over to that: http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm |
Thanks |
Maybey this is connected to the Issue 41 |
I was able to fix this issue by surrounding the call to the focus and print methods with a set timeout. html.push('<script type="text/javascript">function printPage(){setTimeout(function(){focus();print();},2000);' + ((!$.browser.opera && !opts["leaveOpen"] && opts["printMode"].toLowerCase() == 'popup') ? 'close();' : '') + '}</script>'); |
Happening in both IE8 and IE9 for me (but not FF or Chrome).
On page load, I do an ajax call to get some data, then fill out a jQuery template with the data. Inside of the template (meaning that the template has to load with data before the print link even shows) there is a link that calls the printElement() function on the containing div of the template.
I can do an alert on the containing div before printElement() and it shows the correct HTML, however when printElement() fires and I click to print, it just does the entire page.
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: