No one designs cars for those who wish to drive on bald tires, and there is no obligation to design web pages for those who wish to surf with Javascript turned off.
Several posters have mentioned that using Javascript for client-side form validation reduces traffic on the server significantly.
Another reason is to reduce the complexity of one's code. If Javascript catches an error client-side, everything remains as it was. If Perl catches an error server-side, then the entire form must be returned to the user as it was. (I do not think that using a browser's history mechanism to return to the form as it was submitted is reliable in all instances.)
What if the form you are processing can be submitted from several different pages? How do you know the HTML text of the page that submitted the form?
Lincoln Stein includes Javascript support in CGI.pm for a reason. I say use it for form validation if for nothing else.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.