Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-28-2004, 08:32 PM   PM User | #1
elcaro2k
New Coder

 
Join Date: Aug 2002
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
elcaro2k is an unknown quantity at this point
Is it posible to have unselectable text?

I would like to have a page that users cannot select the text and paste it in another document. I know this is ordinarily done using PDF but that isn't an option for me on this project. I have built a temp id card using html and I want the user to be able to print but not copy and paste. Can it be done???


Thanks,
Ray
elcaro2k is offline   Reply With Quote
Old 09-28-2004, 08:54 PM   PM User | #2
trib4lmaniac
Regular Coder

 
trib4lmaniac's Avatar
 
Join Date: Feb 2004
Location: Cornwall, UK
Posts: 535
Thanks: 0
Thanked 0 Times in 0 Posts
trib4lmaniac is an unknown quantity at this point
Images?
trib4lmaniac is offline   Reply With Quote
Old 09-28-2004, 08:59 PM   PM User | #3
elcaro2k
New Coder

 
Join Date: Aug 2002
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
elcaro2k is an unknown quantity at this point
I am using asp v.6 not .net. How would I go about changing the form to an image?
elcaro2k is offline   Reply With Quote
Old 09-29-2004, 06:40 PM   PM User | #4
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Consider using a page without the sensitive text on it for a "display" page while using a <link> tag to designate the "print" version page which will be called by the user's browser when they go to print. Make doubly sure the users don't bring the "print" page to their browser window by adding a CSS style sheet to the print page like this:

Code:
<style type="text/css">
@media screenl {body {display: none;}}
</style>
This can still be bypassed by the savvy user but it's going to take more work and there is just no way to completely prevent the user from copying anything they want.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.
Roy Sinclair is offline   Reply With Quote
Old 09-29-2004, 08:53 PM   PM User | #5
]|V|[agnus
Regular Coder

 
Join Date: May 2004
Location: Minneapolis, MN, USA
Posts: 904
Thanks: 0
Thanked 0 Times in 0 Posts
]|V|[agnus is an unknown quantity at this point
I like that solution, but for what it's worth, CSS generated content is not selectable either, as far as I know.
__________________

Opposite of Sequitur
]|V|[agnus is offline   Reply With Quote
Old 09-29-2004, 09:05 PM   PM User | #6
AaronW
Senior Coder

 
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 1,223
Thanks: 0
Thanked 0 Times in 0 Posts
AaronW is an unknown quantity at this point
A javascript event handler known as onselectstart could be used on the body tag:

<body onselectstart="return false;">

Though, javascript can be disabled. Your best bet is images. PHP can generate images, and I'm sure ASP and PERL can too, but I'd imagine it's not as easy...

Try the PHP forums if you're interested in that method. Otherwise, there will be a way around it.
__________________
offtone.com | offtonedesign.com
AaronW is offline   Reply With Quote
Old 09-29-2004, 09:33 PM   PM User | #7
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Generating Images using ASP can be difficult, using .NET it's a snap. Since he states he has ASP but can't do .NET it's probable that PHP is out of the question too.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.

Last edited by Roy Sinclair; 09-29-2004 at 10:13 PM..
Roy Sinclair is offline   Reply With Quote
Old 09-29-2004, 10:00 PM   PM User | #8
hemebond
Senior Coder

 
Join Date: Jul 2004
Location: New Zealand
Posts: 1,315
Thanks: 0
Thanked 2 Times in 2 Posts
hemebond is an unknown quantity at this point
Quote:
Originally Posted by elcaro2k
Can it be done???
If you send it in a text format, they can do what they like. If you send it any other way, they can just type it out.

Just like protecting images, if you don't want them to have it, don't send it to them.
hemebond is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:34 AM.


Advertisement
Log in to turn off these ads.