Joe Reynolds wrote:
i have an application that will take user input from a text
box and write it to an access database. i need to make sure
that if they ever enter a single line of text that it has
at least 1 space for every 40 characters.
This explains your earlier problem with a CSS solution. You aren't talking
about normal blocks of text. You are talking about users who enter
contiguous blocks of characters in an attempt to break your layout. You
should have said so in the first place.
so before i write the info to the database i have to make sure
there is no lines of text that are longer than 40 characters
without a space, and if there are insert a space at the 41st
character.
I disagree. You ought to either reject it outright or display it as entered.
The data should reflect what your users enter. If you want to enforce rules,
then force your users to obey them. If you are going to let them submit
anything they want, then you have an obligation to display what you allowed
them to submit.
I am more than willing to help you approach this sanely. Here's a pure CSS
freebie:
<div style="width:250px; overflow:hidden;">
Taking a validation approach is obviously not as simple, but I can certainly
give you pointers if you like. Don't expect any more help from me if you
toppost, though.
is that as hard as it sounds?
It is exactly as easy and exactly as hard as it sounds. It sounds trivial to
me and hard to you. It *IS* trivial to me...
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.