<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1013387" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1013387</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/count-words-textarea#comment-1077814</link>
    <description> &lt;p&gt;yep, that worked &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;br /&gt;
i had to modify the code a little bit:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;amp;lt;script LANGUAGE=&amp;quot;JavaScript&amp;quot;&amp;amp;gt;&lt;br /&gt;function CharLeft(target) {&lt;br /&gt;var maxLength = 81;&lt;br /&gt;string = document.wettbewerb.story.value;&lt;br /&gt;words = string.split(&amp;quot; &amp;quot;);&lt;br /&gt;&lt;br /&gt;if (target.value.length &amp;gt; maxLength) {&lt;br /&gt;	target.value = target.value.substring(0,maxLength);&lt;br /&gt;	charleft = 0;&lt;br /&gt;} else {&lt;br /&gt;	charleft = maxLength - words.length;	&lt;br /&gt;}&lt;br /&gt;document.wettbewerb.msg_len.value = charleft;&lt;br /&gt;}&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;textarea name=&amp;quot;story&amp;quot; rows=3 cols=45 onChange=CharLeft(this) onFocus=CharLeft(this) onKeyDown=CharLeft(this) onKeyUp=CharLeft(this)&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input value=80 size=3 name=&amp;quot;msg_len&amp;quot; readonly&amp;gt;&amp;lt;br&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
like this, it&#039;s writing the number of words left directly into the form-field.&lt;br /&gt;
thanks jon for your help!&lt;/p&gt;
 </description>
     <pubDate>Mon, 05 Feb 2001 14:43:47 +0000</pubDate>
 <dc:creator>merlin</dc:creator>
 <guid isPermaLink="false">comment 1077814 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/count-words-textarea#comment-1077745</link>
    <description> &lt;p&gt;Try this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;string = document.form_name.textarea_name.value;&lt;br /&gt;&lt;br /&gt;//creates array &amp;quot;words&amp;quot; by splitting string where there is whitespace&lt;br /&gt;words = string.split(&amp;quot; &amp;quot;);&lt;br /&gt;&lt;br /&gt;//counts words&lt;br /&gt;document.write(words.length);&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Jon.&lt;/p&gt;
 </description>
     <pubDate>Fri, 02 Feb 2001 21:00:11 +0000</pubDate>
 <dc:creator>jonsteele</dc:creator>
 <guid isPermaLink="false">comment 1077745 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/count-words-textarea#comment-1077723</link>
    <description> &lt;p&gt;well, yes, i could. if i only knew how to do that... &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt; i don&#039;t know java this good. could anyone help me out?&lt;/p&gt;
 </description>
     <pubDate>Fri, 02 Feb 2001 07:57:26 +0000</pubDate>
 <dc:creator>merlin</dc:creator>
 <guid isPermaLink="false">comment 1077723 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/count-words-textarea#comment-1077714</link>
    <description> &lt;p&gt;Couldn&#039;t you count the &quot; &quot; (whitespace) then add 1 to get number of words? Just a thought.&lt;/p&gt;
&lt;p&gt;Jon.&lt;/p&gt;
 </description>
     <pubDate>Thu, 01 Feb 2001 23:57:01 +0000</pubDate>
 <dc:creator>jonsteele</dc:creator>
 <guid isPermaLink="false">comment 1077714 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
