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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.