TetraFlash
TetraFlash

Reputation: 327

HTML/Javascript: Disable Copy and Pasting of Certain DIVS

I need to find a way to prevent the user from copy and pasting a particular DIV in an html file. I am limited to HTML and Javascript as this wont be hosted on a real webserver, just a network drive. I am also stuck dealing with IE8 specifically.

Basically the page has 2 main DIVs. One visible and One not (long story) but I need a way to make it so that if a user highlights the entire page or CTRL-A's, they dont get the content of the second DIV.

Any ideas?

Upvotes: 0

Views: 683

Answers (1)

Dauh Fhauc
Dauh Fhauc

Reputation: 141

Use a hidden iframe with the contents of that second div.

Upvotes: 1

Related Questions