inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 13, 2006 16:26:01 GMT -8
Global FooterThis code ensures all messages are a certain length before they are posted. It is useful in stopping people who give one word replies. Just edit the bold number with the minimum number of characters <script type="text/javascript"> <!-- /* minimum message length - ross support.proboards.com do not redistribute without permission */
// Minimum number of characters var MinLength = 30;
// no need to edit below function checkLen() { if(document.postForm.message.value.length > MinLength) { input.item(zLength-3).removeAttribute('disabled'); input.item(zLength-4).removeAttribute('disabled'); } else { input.item(zLength-3).setAttribute('disabled','true'); input.item(zLength-4).setAttribute('disabled','true'); } }
function quick_checkLen() { if(mes.item(0).value.length > MinLength) { obj.removeAttribute('disabled'); } else { obj.setAttribute('disabled','true'); } }
var input = document.getElementsByTagName('input'); var zLength = input.length; var mes = document.getElementsByName('message');
if(document.postForm) { document.postForm.message.onkeyup = function() { checkLen(); } while(input[zLength-1].value != 'Reset') { zLength--; } checkLen(); }
else if(mes.item(0)){ mes.item(0).onkeyup = function() { quick_checkLen(); } while(input[zLength-1].value != 'Post Reply') { zLength--; } var obj = input.item(zLength-1); quick_checkLen(); } //--> </script>
|
|