June 18th, 2013, 10:16 AM
i have text field which value already populate in and not leeting user to override the value from it.
I use onkeydown return false and it worked fine for not letting user remove the value. However, i still do copy and paste into it. I try onMouseDown return false but it seems didn't work. Does any one know to prevent user from copy and paste?
<input type="text" name="fname" value="#myqyery.fname#" onclick="return false" onkeydown="return false" onMouseDown="return false" />
June 18th, 2013, 10:25 AM
no need to reinvent the wheel: the readonly attribute
Any browser element can be manipulated, though. So if this is supposed to be some "security feature", it won't work. The fname value that arrives at your server can be anything.