File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes How to eliminate copy & Paste in textarea in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic

How to eliminate copy & Paste in textarea in javascript

srinivas rao

Joined: Nov 21, 2007
Posts: 5
Kindly, helpe me in this regard,

I have a textarea and should accept only alphanumeric characters upto 500 characters and if we do copy and paste more than 500 characters it should take 500 characters and remaining should eliminate.

kindly, provide me the code how to perform this
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
This is not really a Struts question. I know that there are some pages in my application that use JavaScript to limit the length. I suggest that you jump over to your favorite search engine and search for "limit textarea size".

- Brent
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How to eliminate copy & Paste in textarea in javascript
It's not a secret anymore!