Entry
Can I protect a text field/text area against pasting in text (Ctrl-V or right click->paste)?
May 16th, 2001 14:00
Robert Taylor, Martin Honnen, T Hildebrandt,
In IE4+ and NN6 you can make a text field or textarea read only by
setting
<INPUT TYPE="text" NAME="fieldName" READONLY>
or with js
document.formName.fieldName.readOnly = true;
This prevents pasting of text into the text field.
I don't know of a way to prevent it with NN3, NN4, or IE3.
For a cross-browser solution, use the technique described here:
http://faqts.com/knowledge_base/view.phtml/aid/868/fid/130