Allow user to fill predefined space

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roderick Thomas

    Allow user to fill predefined space

    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.
  • HikksNotAtHome

    #2
    Re: Allow user to fill predefined space

    In article <c0f102fd.03102 01239.661a7159@ posting.google. com>,
    roderick_thomas @hotmail.com (Roderick Thomas) writes:
    [color=blue]
    >This problem centers around the basic character/line count problem
    >most people have asked and have received numerous responses to.[/color]

    <--snip-->
    [color=blue]
    >
    >Any insight or advice on this would be great.[/color]

    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

    Comment

    Working...