Welcome Guest [Log In] [Register]

Welcome to Big Boards. Big Boards at one time offered the Zathyus network our long famous Resource Archives, our extensive search indexes, and our info-packed resource forums. Eventually, these were made redundant by upgrades to the documentations and expanded search features added to the ZetaBoards software, and this forum then lost relevancy and subsequently became inactive.

Our team then embarked on a new project called Planet Nexus, where a bold new experiment in forum promotion is taking place. We call it nexworking. NexusTree offers social networking pages for forums in a fully automated format. Your NexusTree page is created instantly when your join the nexus. Find out more by visiting Planet Nexus, and become part of the nexworking revolution.

Posted Image Posted Image
If you're already a member please log in to your account for additional access:

Username:   Password:
Closed Topic
Word/Character Count
Topic Started: Aug 21 2009, 09:40 PM (516 Views)
C0smic1
BB Alpha
[ * ]
Board URL: http://novelistsguild.x10hosting.com/forums/index.php
What browser(s) are you using? Google Chrome
Your Issue/Question:I would like someone to I've me a code which will display the current amount of characters/words in a text field. If possible it would be nice if the code updated with every new word/character. I would just like it to be a counter, nothing fancy. as I am NOT using ZetaBoards I don't want any of that fancy append stuff. I just want a code which will do it when the element's ID matches the text field.

Also if you could explain how the code works just for my own reference it would be nice.

In summary: I want a code which will place the amount of characters/words inside a text field (please give me a code for both if possible) on the page in a location of my choosing.

Thanks!
Posted Image
Offline
Profile
Goto Top
 
Posted ImageMike
Member Avatar
Official BB Coda

I made this a while back for my script hosting tool:
Code:
 
<textarea name="codes" cols="55" rows="18" onkeypress="getlength()" onkeyup="getlength()"></textarea><br />
<div>Characters Left: <font id="charleft" color="green">30000</font></div><br />

<script>
function getlength(){
var charleft=document.getElementById("charleft");
var codeslength=30000-document.hoster.codes.value.length;
if(codeslength<0){charleft.style.color="red";document.hoster.create.disabled=true;}
else{charleft.style.color="green";document.hoster.create.disabled=false;}
charleft.innerHTML=codeslength;}
getlength();
</script>
If you know coding, it should be easy to set up for your purposes.
Posted Image
Cory: "Mwr is right." - HelenaZF: "Mike is right"
^ All will realize soon enough ;)]
Offline
Profile
Goto Top
 
C0smic1
BB Alpha
[ * ]
Thanks, though you guys really need to work on speeding up your replies. Just look at the time stamps and you'll see what I'm talking about.
Posted Image
Offline
Profile
Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Global Support Archive · Next Topic »
Closed Topic