|
Form Validation : more featuresThis is in continuation of the JavaScript Form Validation script explained here. In this page, we will see some of the advanced features of the script.Showing all the form validation errors together in a message boxFor some forms, you may wish to show all the errors together. You can do that just by adding a function call, if you are using the JavaScript form validation script.
If you want to show all the error messages together in the message box, then just call the EnableMsgsTogether() function in the validator object.
For example: See the form validation sample code Showing the form validation errors on the page itselfYou can display the validation errors on the page itself.
create a DIV on the page for the errors the DIV should be named as {formname}_errorloc where {formname} is the name of your form. For example:
<div id='myform_errorloc' class='error_strings'></div>
Call the EnableOnPageErrorDisplaySingleBox() function to enable on page error display.
For example: See the form validation sample code that illustrates the on page error display. |
|
. Copyright © 2003-2009 JavaScript-coder.com. All rights reserved. |
||