The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Word Counter Failure

View previous topic View next topic Go down

Word Counter Failure

Post by Forever+More on July 16th 2010, 4:41 pm

I tried adding a Javascript code app to my site that was a word counter. Apparently it didn't work. Is there anyway to fix this code to work under the site widget section on the side of the site, or is there any place i can find a new code?

Spoiler:
<form method="POST" name="wordcount">
<script language="JavaScript">

function countit(){

/*Word count script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><textarea rows="12" name="wordcount2" cols="60" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" name="wordcount3" size="20"></p>
<div align="center"><center><p><font face="arial" size="-2">This free script provided by</font>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
</center></div></div></td>
</tr>
</table>
</form>

Forever+More
New Member

Posts : 4
Reputation : 0
Language : English

Back to top Go down

Re: Word Counter Failure

Post by Gramagamus Online on July 17th 2010, 12:39 am

Try this:
Code:
<form name="form1" method="post">
<textarea name="inputString" cols="50" rows="4">Text to count</textarea>
<br>
<input type="button" name="Convert" value="Count Words" onClick="countWords();">
<input name="wordcount" type="text" value="" size="6">
</form>

Gramagamus Online
Forumember

Male Posts : 441
Reputation : 0
Language : English | HTML |
Location : Australia

http://gramagamus.darkbb.com/

Back to top Go down

Re: Word Counter Failure

Post by Forever+More on July 17th 2010, 12:52 am

The code went through but the text is white on white on where you put the words in, and the part where it tells you how many words is black on black. x.x

Forever+More
New Member

Posts : 4
Reputation : 0
Language : English

Back to top Go down

Re: Word Counter Failure

Post by Gramagamus Online on July 17th 2010, 1:04 am

Code:
<font color=#000000><form name="form1" method="post">
<textarea name="inputString" cols="50" rows="4">Text to count</textarea>
<br>
<input type="button" name="Convert" value="Count Words" onClick="countWords();">
<input name="wordcount" type="text" value="" size="6">
</form></font>
That should probably work Wink

Gramagamus Online
Forumember

Male Posts : 441
Reputation : 0
Language : English | HTML |
Location : Australia

http://gramagamus.darkbb.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum