Information générale
Catégorie:
Applications Internet
You can do it on the client, and it saves bandwidth and help performance to do so, but you also *must* repeat the checks on the server. In addition to the problem you found, there are two additional areas of concern: (1) The client can disable JavaScript in some browsers; and (2) You can easily hack this technique and submit invalid data (for example by saving the HTML source to a local file and then editing out the JS checks).
-- Randy
>This worked well until I discovered in the backend database that there were some records with mandatory fields missing. I tracked it down to that fact that some older Netscape browsers were ignoring the Javascript. I decided to remove the Javascript and perform the validation on the server side using ASP. This works well, although in my opinion it's not as elegant looking as the Javascript validation.
>
> My question is what do other people do for validation in their web pages?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement