Welcome to the Monastery | |
PerlMonks |
Re: CGI and JavaScriptby sierrathedog04 (Hermit) |
on Jun 03, 2001 at 02:14 UTC ( [id://85236]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Meditations
|
|