![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Is there anyway to format a text input so the user cant enter punctuation marks? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Isn't Disney bound to a 3d thing for xmas |
#5
| |||
| |||
|
|
PW wrote: Hi, Is there anyway to format a text input so the user cant enter punctuation marks? 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. There is where you can make the final and absolute check of the input. You can either quietly filter out the unwanted characters or return to then previous form with an error message. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
#6
| |||
| |||
|
|
tbar wrote: Isn't Disney bound to a 3d thing for xmas Ok. You've discovered Usenet. Now go away until you realize just what it is. |
#7
| |||
| |||
|
|
tbar wrote: Isn't Disney bound to a 3d thing for xmas Ok. You've discovered Usenet. Now go away until you realize just what it is. -- -bts -thinking about the killfile |

#8
| |||
| |||
|
|
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. |
#9
| |||
| |||
|
|
Hi, Is there anyway to format a text input so the user cant enter punctuation marks? |
#10
| |||
| |||
|
|
Jonathan N. Little <lws4art (AT) centralva (DOT) net> scripsit: 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. 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |