First check whether Js is disabled if yes, redirect them to another page where u have server side validation.
Or give the users a message saying JS is disabled and u need to enable it using NOSCRIPT tag.
Everything has disadvanatages and advantages.
Server side validation means extra load on server and user frst have to submit the page first in order to get validated.
When do we go for server side validation?
In all my web apps I look upon client-side validation as a 'user experience' enhancement. Functionally, my server-side code makes no assumptions about what is submitted and performs full server-side validation on the data.
Originally posted by Pradeep Bhat:
One more question- "Is it okay to have an web app wher some pages uses client side validation and others use server side validation ?. "
I feel that user may not like this. Any comments?
coz it says that
" When pages utilize scripting languages to display content, or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology"
It all depends the users you targeting in ur web app
What about the round trip time if the user makes some mistake.
That's the 'user experience' part. It's nice to have client-side validation so that the user gets an error notification at the earliest possible time. But I think it's a grave mistake to assume that client-side validation makes it safe to ignore server-side validation.
"Is it okay to have an web app wher some pages uses client side validation and others use server side validation ?. "
As long as you never assume that client-side validation ensures that the data is good when it gets to the server, you can make such decisions based upon what makes the most sense for your app and your user base.