in reply to CGI and JavaScript
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI and JavaScript
by stuffy (Monk) on Jun 03, 2001 at 03:51 UTC | |
by thabenksta (Pilgrim) on Jun 04, 2001 at 09:27 UTC | |
by Zaxo (Archbishop) on Jun 04, 2001 at 11:46 UTC |