I found some code, I think javascript (which I am not familiar with) on another 
website.  The code builds a text area box and counts the words that you type.  
I have successfully been able to edit it to count characters instead.  I have 
run into a snag however.  It works great by itself as seen here:

<form name="form_count">
  <textarea rows="8" name="word_input" cols="60" wrap="virtual" 
onkeyup="f=document.form_count; f.word_count.value=f.word_input.value.length;">
  </textarea>
  <p>
    <input type="text" name="word_count" size="20">
  </p>
</form>

When I place this code inside of my code, where I want it, it doesn't work 
anymore.  It has some thing to do with putting it in another form.  Can you 
have nested forms?  Here is the code I am working with now:

<table border="0" width="600">
  <cfform method="post" preservedata="yes">
    <tr>
      <td>
        <form name="form_count">
          <textarea rows="8" name="word_input" cols="60" wrap="virtual" 
onkeyup="f=document.form_count; f.word_count.value=f.word_input.value.length;">
          </textarea>
          <p>
            <input type="text" name="word_count" size="20">
          </p>
        </form>
      </td>
    </tr>
  </cfform>
</table> 

Any thoughts on what I might be doing wrong or what I need to adjust?  Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2067
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to