Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2004, 08:29 AM
Authorized User
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable Copy Paste

Hi,
   How to disable the Copy Paste Option of Textbox or Text Area without using javascript?
__________________
Try Try Try Until You Succeed
 
Old June 23rd, 2004, 12:13 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Try this.....

<textarea oncopy="return false" onpaste="return false" oncut="return false"></textarea>

HTH,

Snib

<><
 
Old July 2nd, 2004, 04:18 AM
Registered User
 
Join Date: Jul 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Mekala Send a message via Yahoo to Mekala
Default

This doesn't work for netscape! What is the alternate?
 
Old June 28th, 2007, 02:57 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

is it possible for simple asp text box? java script is also welcome

 
Old July 19th, 2007, 02:00 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

OK, I'll be the one to ask the stupid question.

I've seen sites, especially gallery sites that disable copy and paste for images so that you have to purchase images from the website. You can't just copy the sample images. I get that.

But why would you stop someone from copying the material in your textbox/textarea? You shouldn't have much info in a form field, so even if you "protect it" someone can still easily type it. I guess I don't understand what real advantage you hope to get by locking it down, and as you can see, for a solution that works cross browser you virtually HAVE to use Javascript and it's ugly. That's a lot of work for a solution that's not going to work very well.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old August 11th, 2007, 05:09 AM
Registered User
 
Join Date: Aug 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nairaby
Default

i agree with chroniclemaster1.
but its good to know something we don't know.


C@B@Ge G@R|)EN





Similar Threads
Thread Thread Starter Forum Replies Last Post
copy paste !!!!!!! dpkbahuguna Beginning VB 6 1 March 30th, 2007 10:06 AM
copy paste problem paul20091968 Excel VBA 4 November 20th, 2006 10:48 AM
Copy, Paste dpkbahuguna Beginning VB 6 1 October 26th, 2006 10:30 AM
copy and paste url k.manisha ASP.NET 1.0 and 1.1 Professional 1 October 14th, 2006 05:15 AM
Copy and append paste canmex Access 2 October 7th, 2003 01:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.