P
PW
Hi,
Is there anyway to format a text input so the user cant enter punctuation
marks?
TIA,
PW
Is there anyway to format a text input so the user cant enter punctuation
marks?
TIA,
PW
PW said:Hi,
Is there anyway to format a text input so the user cant enter punctuation
marks?
tbar said:Isn't Disney bound to a 3d thing for xmas
Beauregard said:Ok. You've discovered Usenet. Now go away until you realize just what it
is.
Beauregard said:Ok. You've discovered Usenet. Now go away until you realize just what it
is.
Jonathan N. Little said:Before it is posted, your can use JavaScript to check the input, but
that is no guarantee because the user may have JavaScript disabled.
You should *always* check user input upon the receiving end at the
server-side script.
PW said:Hi,
Is there anyway to format a text input so the user cant enter punctuation
marks?
Jukka said:In this particular case, the check should probably be made _only_ in the
server.
As a rule, it is a good idea to consider setting up client-side checking
as well, after you have designed and implemented the server-side check.
Immediate checking is good for usability and accessibility: the user
gets an error message at an early phase where he remembers what he just
did and has the context and position in front of his years, literally or
figuratively.
However, double checking tends to be expensive in terms of
implementation and maintenance work. You normally use two quite
different programming languages, JavaScript for client-side checking and
something else for server-side checking. This means duplicate coding;
only the overall logic is the same. Moreover, any changes need to be
implemented twice, and this means that some day you (or you successor as
the maintainer) will forget this. Testing needs to be duplicated, too -
with scripting enabled and scripting disabled. Testing the client-side
checking is problematic, since there are differences between browsers in
JavaScript implementations.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.