BliarOut Posted August 31, 2007 Share Posted August 31, 2007 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) Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted August 31, 2007 Share Posted August 31, 2007 I'm so confused. So you're trying to record something in a log when someone prints the page? Is that it? Quote Link to comment Share on other sites More sharing options...
BliarOut Posted August 31, 2007 Author Share Posted August 31, 2007 Yup, I probably didn't explain it very well! When someone prints I want to run a MySQL insert query and dump the IP address, time and user ID etc into my log table. Quote Link to comment Share on other sites More sharing options...
BliarOut Posted September 1, 2007 Author Share Posted September 1, 2007 Still no further with this.... Surely there's an easy way to log when someone prints a record? I can't be the only person who wants to audit what my users are doing on my system. Quote Link to comment Share on other sites More sharing options...
hostfreak Posted September 1, 2007 Share Posted September 1, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.