answersLogoWhite

0


Best Answer

please use <html:javascript> tag in your home jsp page

eg:

<html:java script formName="logical name of the form given in validation.xml"/>

and place,

<html:form action="/reg" onsubmit="validateLogicalNameOfTheForm(this)">

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you do client side validation using struts 1.3?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Does HTML code work in java script?

Yes it does. That is how client side validation of html control is possible using javascript


What is the difference between client side scripting and server side scripting languages?

Best Practice : Use both The Cons of using one or the other : With client side validation only, if a user disables JavaScript, then no validation will occur. With server side validation only, there are more return trips to the server which in turns uses more resources and slows down the site when a client side script could have done the validation without the server. The Pros of having both : The data will always be validated, whether or not the client has JavaScript enabled or not. There will be less server strain with the client side validation. The client can fix form errors faster with instant client side notifications. The data will have a bit more integrity going through the dual validation process.


What are advantages of using JavaScript validations?

The main advantage to JavaScript validation is that it allows for instantaneous feedback for the user. User's are less likely to become annoyed if the form is capable of telling them that their data is invalid right away.Client-side validation also leads to less traffic. Rather than the server having to receive the entire HTML form POST, just to have it return an error, you can instead significantly cut down on the amount of data being sent to and from the server.It's important to note that even with JavaScript validation, server-side validation in a higher language must be done. JavaScript is client side, so it's possible to circumvent JavaScript validation with very little effort. If you rely solely on JavaScript validation, you will eventually receive bad (even potentially harmful) POSTS at the server. A web developer that doesn't do server-side checks has a very short career.


What was used before JavaScript for validating forms?

Before JavaScript, all form validation was done on the server-side, using whatever language the developers had decided to work in.This is still the case. While JavaScript validation can provide useful and immediate feedback to a user, developers cannotrely solely on JavaScript. This is because the client-side nature of JavaScript means that a hacker can change the code. Without server-side validation whatever value the hacker has now added will be passed into the program. This opens up a massive security hole as any individual with just a little knowledge can potentially insert malicious code into your program.


What is client side usage in xml?

XML does not have the concept of client-side/server-side.

Related questions

What is A clientside control IN ASPNET?

Client side control will do validation and other kind of stuff in the client side.


Does HTML code work in java script?

Yes it does. That is how client side validation of html control is possible using javascript


How is client side validation carried out?

Generally client side validation uses functions or a validation object and methods to check that a user has entered valid data, and that all required data is entered. Validation for text fields is often done by attaching a function call to the "blur" event of the text element. Validating that all required data is present is normally done by attaching an event to the "submit" event on the form. In all cases, you have to be aware that client side validation is only useful for user experience. It cannot be relied on, and so even with it, server side validation has to be done on the submitted data. This is true even in cases where AJAX is employed, as all client side code is suspect.


Why the forms validations in a HTML page is done using client side language instead of server side language?

Local validation on the client machine is much quicker than remote validation on the server. This makes your page more responsive to the user, and users like responsive pages. Also, local validation does not refresh the page, which means the user is not interrupted in filling in the form. New AJAX technology allows quite rapid server side validation without having to refresh the page. Use it where local validation is not possible - for example checking if a value already exists (or not) on the database.


How does form validation differ in JavaScript and PHP?

In JavaScript the validation is done client side, which means it can be easily bypassed by turning JavaScript off in your browser. But with PHP it is server side, which means you can't switch it off, so you can't bypass the validation.


What is the difference between client side scripting and server side scripting languages?

Best Practice : Use both The Cons of using one or the other : With client side validation only, if a user disables JavaScript, then no validation will occur. With server side validation only, there are more return trips to the server which in turns uses more resources and slows down the site when a client side script could have done the validation without the server. The Pros of having both : The data will always be validated, whether or not the client has JavaScript enabled or not. There will be less server strain with the client side validation. The client can fix form errors faster with instant client side notifications. The data will have a bit more integrity going through the dual validation process.


What is validation in aspnet?

Validation is simply making sure any data coming back from the client is appropriate. It can be both client and server side and is handled by the ASP.NET server controls (valiation controls). These are very easy to work with, as its normally just a matter of dropping them on the page.


What are advantages of using JavaScript validations?

The main advantage to JavaScript validation is that it allows for instantaneous feedback for the user. User's are less likely to become annoyed if the form is capable of telling them that their data is invalid right away.Client-side validation also leads to less traffic. Rather than the server having to receive the entire HTML form POST, just to have it return an error, you can instead significantly cut down on the amount of data being sent to and from the server.It's important to note that even with JavaScript validation, server-side validation in a higher language must be done. JavaScript is client side, so it's possible to circumvent JavaScript validation with very little effort. If you rely solely on JavaScript validation, you will eventually receive bad (even potentially harmful) POSTS at the server. A web developer that doesn't do server-side checks has a very short career.


How does javascript validate input?

Since JavaScript is a client-side language, all input will be validated on the client-side. This could be simple validation of forms such as checking if the user-submitted e-mail is actually an email, or if the submitted name doesn't have special characters (!#%) etc. These validations can easily be bypassed by manipulating the javascript, so it's not safe. Typically you would do some validation on the server-side just to be safe when storing to a database.


What was used before JavaScript for validating forms?

Before JavaScript, all form validation was done on the server-side, using whatever language the developers had decided to work in.This is still the case. While JavaScript validation can provide useful and immediate feedback to a user, developers cannotrely solely on JavaScript. This is because the client-side nature of JavaScript means that a hacker can change the code. Without server-side validation whatever value the hacker has now added will be passed into the program. This opens up a massive security hole as any individual with just a little knowledge can potentially insert malicious code into your program.


How do you create login and registration forms using PHP and MySQL?

A very simple formCreate a registration formAdd client side validation onsubmit eventAdd database connection, create new database & table with columnsAdd server side validation for the data which is sent by client to serverAdd insert statements to insert form data to mysql (make sure to apply encryption to password)On success, redirect to login formUse the where clause to find if username & password from login form exists in databaseIf successful redirect to main page else notify userAdd username to session variablesSee the Related Links section below for video tutorial on this subject


What is client side usage in xml?

XML does not have the concept of client-side/server-side.