Forums Register Login

Client side validation using JSP ???

+Pie Number of slices to send: Send
Hello,
I know client side validation using JSP is not good. but my client side req. is like this. can u any one tell me how to effectively use JSP for
client side validation. pls provide me some sample code or urls.
With Regards,
Anjali
+Pie Number of slices to send: Send
The only way to to client-side validation is to have code in the browser. This means it will have to be JavaScript not JSP.
There are obviously issues about portability between browsers and users disabling JavaScript etc. A lot will depend upon the intended audience of the application (e.g. is it Internet or Intranet based) and how much control that you have over the version and settings of their browsers.
You will probably need to provide validation in 2 places:
1) Initial validation client-side using JavaScript to enusre that they have filled in all mandatory fields, that numbers are valid etc.
2) Server-side. Repeat the validation in part 1 to cater for the fact that some users may have disabled JavaScript and add additional validation that can access the database to perform consistency checks.
Hope this helps
+Pie Number of slices to send: Send
Hi Anjali,
an example for JavaScript-Validation:

post, if you have questions about it
cb
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 6862 times.
Similar Threads
How to validate time field using validator framework of struts
Client side validation in JSF
Server Side validation - what kind of work flow have to follow?
Problem Uploading Files
validating forms
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:21:53.