Entry
can i create a TextField that doesn't allow Paste(and Ctrl+v) but allows users to type in string
May 17th, 2006 16:14
Krunal Bhatt,
<html>
<head>
<script language="javascript">
function onKeyDown() {
var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();
if (event.ctrlKey && (pressedKey == "c" ||
pressedKey == "v")) {
// disable key press porcessing
event.returnValue = false;
}
} // onKeyDown
</script>
</head>
<body oncontextmenu="return false;" ondragstart="return false;"
onmousedown="return false;">
<form name="aForm">
<input type="text" name="aText" onkeydown = "onKeyDown()">
ajadflkja kljdf pao klasdfkjeiklj oi adfk iowkse d f ldjfpq dfae sdhga
</form>
</body
</html>