Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Livecycle 8.0 count number of words in textfield

Status
Not open for further replies.

dcompto

Technical User
Jul 5, 2001
751
US
Creating a form in Livecycle 8.0, wherein I have a textfield, txtQualSum, in which the user types a "150 word summary of Nominee's qualifications". I would like the words to be counted (up to a maximum of 150 words) as the user enters text into the textfield.

I found a javascript snippet (shown below), posted by Justin Cook, which is exactly the type of thing I want--I just haven't figured out how to modify it for my form. See for his working example.

The first line of my script is:
form1.Page2.grpNominee.subfrmQualSum.txtQualSum::mouseEnter: - (JavaScript, client)
followed by:
Code:
<form name="form_count">
<textarea rows="8" name="word_input" cols="40" wrap="virtual" onkeyup="f=document.form_count;f.word_count.value=f.word_input.value.split(' ').length;"></textarea>
<p><input type="button" value="Count Words" onClick="f=document.form_count;f.word_count.value=f.word_input.value.split(' ').length;"> 
<input type="text" name="word_count" size="20"></p>
</form>
Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top