Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Images?

  • #3
    New Coder
    Join Date
    Aug 2002
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using asp v.6 not .net. How would I go about changing the form to an image?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I like that solution, but for what it's worth, CSS generated content is not selectable either, as far as I know.

  • #6
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Last edited by Roy Sinclair; 09-29-2004 at 10:13 PM.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #8
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •