File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable mouse selections in JSP Input Field

 
Nitin Sinha
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP Page in which I have 2 input fields -
First one for entering email address and second one for Re-Entering email address.

Now, my query is that i don't want user to cut / copy email address from one box and paste it onto another box. For this I have used JavaScript to clock ctrl+X,V,C and right clicks etc..

But my question is that is there a way to disable Cut & Paste options from browsers 'EDIT' Menu.

If not then how can i block mouse selection from Input fields, that is disallow users to select what they typed in Input Box.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such thing as a JSP input field.

I'll move this to our HTML/Javascript forum where you'll get better help with client side coding issues.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is really no real way to do it. Most companies do not bother to block it.

You can look into oncopy and onpaste, but they are not widely supported.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic