Disabling Content Selection

Discussion in 'JavaScript' started by zdestiny, Jun 4, 2006.

  1. #1
    I need a code to prevent people from selecting all content on my page, including text and images. I think there is a <div> code to do this but I am not sure. I need any type of code except javascript - preferably a style code. I tried using this but its not working in IE

    <body style="-moz-user-select: none; -khtml-user-select: none; user-select: none">
     
    zdestiny, Jun 4, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    ?? You mean in order to keep people from copying your content or markup? Not possible. Else, be more descriptive.

    cheers,

    gary
     
    kk5st, Jun 4, 2006 IP
  3. zdestiny

    zdestiny Peon

    Messages:
    138
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not to protect content, i know that is impossible. I just want to disable selection. for eg www.ettmara.com
     
    zdestiny, Jun 4, 2006 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Well, I can't imagine why you'd want to do that, and I also can't imagine any style or javascript method that would last any longer than it takes to disable javascript or styles. That still leaves keyboard selection.

    cheers,

    gary
     
    kk5st, Jun 4, 2006 IP