By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Allow user to fill predefined space

P: n/a
This problem centers around the basic character/line count problem
most people have asked and have received numerous responses to.

However, my question is a little more detailed and I'm hoping for some
help to find a solution (or maybe the solution already exists).

I am interested in offering template capabilities that will allow
users to enter in their own text for a letter. I figured the best
solution would be to present a text area where they could enter their
own letter content. The font's height and height/width of the
printable portion of the stationary have already been determined. So
I know how many lines of text are capable of fitting and how many
characters per line are available before the line wraps on the
stationary.

The problem seems to be knowing the users actions and adjusting the
count based on them. For instance in the given scenario, if a user
enters 3 paragraphs of text(20 lines and 400 characters), then decides
to go into the second paragraph and completely delete it and retype
it, that throws the numbering system completely off. Detecting the
backspace key seems like it's feasible to do, but what about detecting
the data that has been deleted...is that possible?

What about turning off the ability to highlight sections and delete?
What if they were required to only hit the backspace key to delete
previous data? What about the ability to completely turn off the
backspace key in the textarea and require a complete delete of the
data (by a press of a button)?

Any insight or advice on this would be great.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <c0**************************@posting.google.com >,
ro*************@hotmail.com (Roderick Thomas) writes:
This problem centers around the basic character/line count problem
most people have asked and have received numerous responses to.
<--snip-->

Any insight or advice on this would be great.


Onsubmit, check the value of the textarea, and its length, and act accordingly.
Anything else and you are making it more difficult on yourself than it should
be. Perhaps a character counter that is triggered onkeypress that tracks how
many characters have been typed so far, that tracks by the textareas value's
length.
--
Randy
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.