Previous | Next | (P-PDF) JavaScript
Topic: Re: Number of Lines In Field (Via Email)
Conf: (P-PDF) JavaScript, Msg: 28503
From: prodok
Date: 10/13/2001 03:55 AM
The concept of "lines" is not that highly implemented in JavaScript
in general. If you have free text, you would need font information
and a lot more for finding out how many lines your text will use. So,
there is no general way to determine the number of lines your text
has.
However, if your users use manual line breaks, it is possible. You
then evaluate the field value of such a field and count the new line
characters (\r), which then gives you the number of lines...
Hope, this can help.
Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37
e-mail: mailto:max@prodok.com
http://www.prodok.com
[ Building Bridges for Information ]
______________________
Shameless Plug:
I will have presentations and pre- and post-conference workshops at
the .PDF2001 West Conference in Scottsdale, AZ, Nov. 5 to 7, 2001.
More details at http://www.pdfconference.com.
Workshops:
Nov. 4: Implementing Business Processes based on PDF
Nov. 8: Enhancing PDF Forms
_________________________
>Is there a way to check the number of lines in a field? For
>example, I want to make sure there are no more than 16 lines in a
>text field once a button is pressed.