Word Counter Failure
2 posters
Page 1 of 1
Word Counter Failure
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
Re: Word Counter Failure
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>
Re: Word Counter Failure
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
Re: Word Counter Failure
- 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>
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum