View Full Version : For the techies, disabling printing
EscortBiz
05-03-2002, 05:13 PM
Hi
Is there a way to disable printing from IE or netscape?
I dont want users with access to the database to print out stuff from my site.
thanks
AgentCash
05-04-2002, 02:17 AM
This works for IE...
<script>
function hide() { document.body.style.display = 'none'; }
function show() { document.body.style.display = ''; }
</script>
<body onbeforeprint="hide()" onafterprint="show()">
They can still hit print, but they'll just get a blank page.
EscortBiz
05-04-2002, 09:11 AM
It works on my test page, as im about to complete HotLocalEscorts.com I wanted to prevent people from printing what they see.
Thanks
EscortBiz
05-04-2002, 09:13 AM
Is there a way it should print something like "sorry we do not allow printing?"
I think im going to far with this but does nto hurt asking
thanks alot
AgentCash
05-04-2002, 12:21 PM
Ok, I've just come across an even easier way to do this... what you need to do is create a page that says what you want.. "Sorry printing disabled" or whatever. Upload that page to your server. Then on every page you want printing disabled put
<link rel=alternate media=print href="http://your_sorry_disabled_page.com/blah.htm">
inside the <head> tags. So for example if my "Printing disabled" page was http://www.agentcash.com/printdisabled.htm, then a standard disabled page would go something like
<html><head>
<title>Welcome to AgentCash.com</title>
<link rel=alternate media=print href="http://www.agentcash.com/printdisabled.htm">
</head>
<body>
This is my page
</body>
</html>
EscortBiz
05-04-2002, 01:32 PM
wow
so in other words if I wanted i can have it print out a page that looks like mine bbut with screwed up numbers of the director or I can make it print some page with heavy text or images.
Im not a bad guy I just make it clear no printing allowed and if they do ya know
I dont need my directory to join the free porn stuff
thanks so much
AgentCash
05-04-2002, 01:35 PM
Yeah you can make it print anything... and if you make it clear that they aren't supposed to print and they still try, heck make it print a few hundred solid black pages. :D
EscortBiz
05-04-2002, 01:41 PM
Well I might want to make it print
Hi
Its your wife here, why in the world would you go to call an escort service, every guy in the street hits on me you wont be able to find anything hotter then my 5'1 body at 310lbs , so stop looking
Your wife
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.