I have asp.net webpage that, after certain database transaction is done, needs to print the receipt. I accomplish it by the following:
It all works OK in Firefox, but in IE8 the user sees a prompt "The script is trying to close the page, do you want to allow it?", and the page does not close even if the user answers "yes". This is probably because of the print dialog, because if I remove window.print, the page does close. In Chrome it closes the window without any print.
It would be nice to (1) remove the prompt (2) print to the default printer without print dialog (3) close the window automatically. I.e. to make IE8 act like Firefox.
Or perhaps there's some better way to do it, i.e. print several lines on client printer?