Jump to content

How can I log when someone prints?


BliarOut

Recommended Posts

I have an application which I've written primarily in PHP. There are a few snippets of JS here and there, but the guts of it is PHP.

 

What I would like/need to do is to log whenever someone prints off a report in my application. I am aware that IE has a JS onbeforeprint() and an onafterprint() function but I believe FF is lacking in support for this.

 

I know I could put my own print button on the app but I'm concerned that someone could just press <CTRL> P and bypass my code.

 

So, can anyone suggest a way I can put an entry in my log table whenever someone prints from the application? (Print screen isn't an issue)

Link to comment
https://forums.phpfreaks.com/topic/67417-how-can-i-log-when-someone-prints/
Share on other sites

Your probably going to have to use AJAX/PHP. I am not very good with ajax so I can't really help you out here. If I were you though, I would post in the ajax forum and see what they can contribute. Also, take a look at http://members.aol.com/barryaandrew/xmlhttp/article.html . It is a great introduction to ajax, made by a well known member here, Barand. Hope that helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.