ok this is the situation...
I'm able to limit the number of charcters entered into a textarea with some javascript and a couple of event calls. This takes care of when typing, pasting with ctrl+v and pasting with the right-mouseclick.
Only one option remains... edit->paste
Here's my script ...
I'm able to limit the number of charcters entered into a textarea with some javascript and a couple of event calls. This takes care of when typing, pasting with ctrl+v and pasting with the right-mouseclick.
Only one option remains... edit->paste
Here's my script ...
Code:
<script language="javascript">
function ValidateLength(oCtrl, lLength)
{// Use with onKeyUp, onKeyDown and onMouseOut events.
// This will prevent exceeding the length, when typing, pasting with keyboard or pasting with right-mouseclick
if (oCtrl.value.length > lLength)
oCtrl.value = oCtrl.value.substring(0, lLength);
}
</script>
[code]
and in the html...
[code]
<textarea style="width:290px" name="comment_1" onkeydown="ValidateLength(this, 10)" onkeyup="ValidateLength(this, 10)" onmouseout="ValidateLength(this, 10)">
[code]
Anyone have a suggestion? Anyone? Anyone?
-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook