View Full Version : Disable ability to print a web page?

02-27-2012, 09:44 PM
Hello all,

We have a job management system which contains a form where our employees input job information. When the form is submitted it brings you to a page that looks almost identical to it. On this page, the input fields have been changes to the user's submitted text. When this page loads, so does the print dialog so the user can print it instantly.

The problem is that since the form and the print page look the same, some of our employees (out of habit from our old system) hit ctrl+p and print the form before submitting it.

Since there is a way to automatically bring up the print dialog, I was wondering if there is a way to disable it all together.

This system is used only by our employees who all use the latest version of Firefox. The solution only needs to work for this browser.

Any help is greatly appreciated. Thank you!

02-27-2012, 09:52 PM
You could put an "onkeydown" event listener on the page and watch for the ctrl button to be pressed and create an annoying javascript alert calling them obscene names (or maybe just reminding them not to print yet).

Unless there is anything else in the page that *would* require use of the ctrl button you could get away with the least effort by doing something like that.

Alternatively, you could go with something like this, which is more targeted (and since someone else wrote it, it's still easy):