PDA

View Full Version : Disabling Ctrl+C and Ctrl+V in a textbox



Vidya
Feb 8th, 2006, 04:44 AM
Hi,
I have a textbox in which values should only be typed. User should not be allowed to paste data in the text box. So, on press of Ctrl+V key an error message should be displayed.

For instance, in Confirm Email id field, user should not be allowed to paste from the Email id field. How can this be done?
How can this be done?

Have I made it clear? Would appreciate if u can help me out.



Thanks,
Vidya.

vinyl-junkie
Feb 8th, 2006, 06:17 AM
Here (http://www.webdeveloper.com/forum/showthread.php?t=88955) is a post from another forum with some pretty good ideas. Hope it helps.

SpirtOfGrandeur
Feb 8th, 2006, 12:13 PM
This is not a good idea at all. And destroying this functionality could remove some users from your system. I am talking mostly of the handicaped people that use some other form of writing then a keyboard. There are oftwen shortcut's for their email, name, ect. Not allowing these to be pasted in would be a huge annoyance.

That and you have to remember that Ctrl-V, while default on windows boxes, is not the only key combination that is used or can be used.

felgall
Feb 8th, 2006, 09:30 PM
You are not allowed to change Operating System functionality on your visitor's computer.

SpirtOfGrandeur
Feb 9th, 2006, 12:22 PM
You are not allowed to change Operating System functionality on your visitor's computer.

Actually you can do a pretty good job of blocking it... that is not a problem... the problem here is accesibility!