473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.
Jul 20 '05 #1
1 1951
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
For an odd reason that I cannot figure out on my own, when a user attempts to log-in on my Log-In page, they must press the submit button twice. They fill out their credentials (username,...
14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
10
by: KathyB | last post by:
Hi, I just can't get this quite right. I use the following function to validate a user entry. I need to allow negative numbers including those with decimals (e.g., -.5). The following allows the...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
14
by: ford_desperado | last post by:
Why isn't ALLOW REVERSE SCANS the default? Why do we have to - drop PK - create an index - recreate PK What are the advantages of indexes that do not allow reverse scans?
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
2
by: Marc | last post by:
Hi, I want to allow the user to rename a button control. When they click rename from the menu I want the button text to become editable on the actaul button...and then perhaps save the new text...
16
by: Ben Sehara | last post by:
Is there any way I can limit the access to my website? I have a site "A" and I want to allow access to it only from site "B" login user. If someone try to access site "A" directory, I want it...
12
by: ab12 | last post by:
I'm trying to write a program in C that gets a shape outlined with asterisks from the user, and returns that shape filled with asterisks. It will also get the coordinates of a point inside the shape...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.