javascript - Window.print() error in IE in res://ieframe.dll/preview.js -


onclick of anchor tag giving window.print(); call , print pop-up. on click of print following script error.

an error occurred in script on page. line: 2115 char: 1 error: file waiting printed deleted. code: 0 url : res://ieframe.dll/preview.js 

do want continue script on page(yes/no buttons)

may ever click yes/no don't print or in ie8 blank print.

firefox prints fine. but, fails in ie9.

can 1 me on one??

you can error in ie10 if calling window.close() after window.print(), if dom large. guess page has not finished rendering when ie10 executes window.print() call.

you can therefore around issue by:

  • calling window.close() within hover event on page. print dialgue steal user's focus, hover event wont fire until user has finished dealing dialogue. found best solution.
  • not calling window.close() @ ie10 clients
  • as window.print() not have callback, calling window.close() after arbitrary delay. wouldn't recommend unreliable
  • go "nuclear" this answer, loads html hidden iframe before printing, sidestepping need call window.close()

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -