Post by Peter on Oct 29, 2004 10:13:22 GMT
Code created by ?snap2000[/color]
Counts down the characters left in your posts. Includes a handy progress bar.
No example
Footers:
<script><!--
/* Message Characters Left by snap2000 :: blu.proboards14.com */
if(location.href.indexOf('=post') != -1 || location.href.indexOf('=quote') != -1 || location.href.indexOf('=modify') != -1 || location.href.indexOf('=createpoll') != -1 || location.href.indexOf('=imsend') != -1 || location.href.indexOf('=imquote') != -1) {
//Textarea Maxlength
document.postmodify.message.outerHTML += '<b'+'r><table height=18 cellpadding=0 cellspacing=0><tr valign=top><td width=120 nowrap><font size=2>Chars Left: <span id="chrcount"> </span></td><td style="display:inline;padding:0;" id="prog" nowrap></td></tr></table>'
maxLength=9000;document.getElementById('chrcount').innerHTML=maxLength;
function cChar() {
//Char Left
if (document.postmodify.message.value.length > maxLength) {
document.postmodify.message.value = document.postmodify.message.value.substring(0,maxLength)
} charleft = parseInt(maxLength - document.postmodify.message.value.length)
document.getElementById('chrcount').innerHTML = charleft
setTimeout("cChar()",300)
//Progress bar
maxBars=18;pBar = '<div style="display:inline;width:7;height:8;border:1px solid #626262;background-color:#E2E2E2;margin: 1 3 1 0;padding:0;">'
document.getElementById('prog').innerHTML=''
for(m=1;m<=maxBars;m++) {
if(parseInt(maxLength - charleft) >= parseInt((maxLength/maxBars)*m)) {
document.getElementById('prog').innerHTML+=pBar
}}}
cChar()
}
//--></script> #nosmileys
Counts down the characters left in your posts. Includes a handy progress bar.
No example
Footers:
<script><!--
/* Message Characters Left by snap2000 :: blu.proboards14.com */
if(location.href.indexOf('=post') != -1 || location.href.indexOf('=quote') != -1 || location.href.indexOf('=modify') != -1 || location.href.indexOf('=createpoll') != -1 || location.href.indexOf('=imsend') != -1 || location.href.indexOf('=imquote') != -1) {
//Textarea Maxlength
document.postmodify.message.outerHTML += '<b'+'r><table height=18 cellpadding=0 cellspacing=0><tr valign=top><td width=120 nowrap><font size=2>Chars Left: <span id="chrcount"> </span></td><td style="display:inline;padding:0;" id="prog" nowrap></td></tr></table>'
maxLength=9000;document.getElementById('chrcount').innerHTML=maxLength;
function cChar() {
//Char Left
if (document.postmodify.message.value.length > maxLength) {
document.postmodify.message.value = document.postmodify.message.value.substring(0,maxLength)
} charleft = parseInt(maxLength - document.postmodify.message.value.length)
document.getElementById('chrcount').innerHTML = charleft
setTimeout("cChar()",300)
//Progress bar
maxBars=18;pBar = '<div style="display:inline;width:7;height:8;border:1px solid #626262;background-color:#E2E2E2;margin: 1 3 1 0;padding:0;">'
document.getElementById('prog').innerHTML=''
for(m=1;m<=maxBars;m++) {
if(parseInt(maxLength - charleft) >= parseInt((maxLength/maxBars)*m)) {
document.getElementById('prog').innerHTML+=pBar
}}}
cChar()
}
//--></script> #nosmileys