Global GuideLine Home HTML Tutorial JavaScript Tutorial SQL Tutorial CSS Tutorial SEO Tutorial XML Tutorial XSLT Tutorial Articles Tutorial Interview Questions and Answers Guide Jobs GuideLine Bookmark With Google Bookmark With Yahoo Bookmark With FaceBook Bookmark With Live Follow @GlobalGuideLine on Twitter Bookmark Global GuideLine
JavaScript Validations, JavaScript Tutorial, Global Guide Line Technology.
Bookmark this webpage. Bookmark: JavaScript Validations, JavaScript Tutorial Global Guideline is UNITED STATES's favorite website

      Home                    

Basic JavaScript Guide.
 JScript Introduction.            
 JScript Why?                       
 JScript Recognitions.          
 JScript onMouseover.         
 JScript with Buttons.           
 JScript Alerts.                     
 JScript Variables.               
 JScript Operators.               
 JScript Functions.               
 JScript Prompts.                 
 JScript Conditions.             
 JScript Validations.
 JScript Confirmation Boxes.
 JScript Browser Detection.  
 JScript Redirection.            
 JScript on Links.                 
 JScript Switch.                    
 JScript Loops.                     
 JScript Events.                    
 JScript Exception Handling.
 JScript Reserve Characters. 
 JScript with Objects.            
 JScript Math Object.           
 JScript using Dates.             
 JScript using String.            
 JScript using Arrays.            
 JScript Operations.              
 JScript Handling Cookies.   
 JScript in Mapping.             
 JScript Time Out.                
 JScript Summary.                

Learn JavaScript with Examples
Learn JavaScript with hundred of short examples with code and output.
Complete_JScript_Examples.php

JScript Interview Questions & Answers
Learn JavaScript by thousands of Interview Questions & Answers.
JavaScriptQuestions/index.php

JavaScript Tutorial >> Validations in JavaScript.


     Back             Next     





What is JavaScript Validations?

Now we will learn here in JavaScript Tutorial that using of client side JavaScript is an efficient way to validate the user input in web applications. When there are many fields in the form, the JavaScript validation becomes too complex.

A person might think it easy to find a complete radio & checkbox client-side validation JavaScript on the web. It would however be our opinion that such a person would be mistaken. We searched and searched for a JavaScript We could plug and play, so to speak. The reality was, it simply did not exist. Here we define some common live JavaScript validation or what some might call inline error messages to explain more.

These are reusable JavaScript functions for common validations, here you will learn the list of built-in JavaScript functions to make any kind of Validations in JavaScript.
It includes things like checking if a value is a number, integer, blank, and so on...
It also has generic routines for getting and setting the value of any type of input field, as well as checking if the value has changed.

Functions used for JavaScript Validations

Function for JavaScript Validation Description of validating function.
isBlank This JavaScript will return True if the value is whitespace, newlines, or tabs. Otherwise it will return False.
Test Example of Is Blank in JavaScript.
isInteger This JavaScript Function validated a number and returns True if the value is an integer, otherwise it will return False.
isNumeric isNumeric validates the value of any variable and return True if the value is numerical value like (1.4, -4.56, etc), otherwise it will return False.
isDigit idDigit Function validate a single character from 0-9 and return True if the value is a single character 0-9 else it returns False
setNullIfBlank This setNullIfBlank JavaScript Function sets an input field's value to empty if it only contains whitespace, newlines, or tabs
setFieldsToUpperCase setFieldsToUpperCase JavaScript Function sets values of input fields to their uppercase values.
disallowBlank disallowBlank JavaScript function returns true if field is blank, alerts a message, and focuses cursor to field requiring an input. Otherwise returns false.
disallowModify disallowModify JavaScript Function returns true if field has been modified, alerts a message to visitor, and focuses cursor to field that was changed. Otherwise disallowModify returns false.
getInputValue getInputValue JavaScript Function returns the value of any input element, regardless of type. getInputValue returns a comma-separated list for multiple selects and multiple form fields with the same name.
setInputValue setInputValue JavaScript Function sets the value of any input element, regardless of type.
getInputDefaultValue getInputDefaultValue JavaScript Function returns the default value at page load time of any input element, regardless of type. getInputDefaultValue returns a comma-separated list for multiple selects and multiple form fields with the same name.
isChanged isChanged JavaScript Function returns true if the current value of a form field does not equal the value when the page was loaded.

     Back             Next     
 

JavaScript If Else and Switch Statements Examples



Examples of JavaScript Select and Option Objects



Form Object and Form Elements Examples



In order to link this page as Reference, click on below text area and pres (CTRL-C) to copy the code in clipboard or pres right click then copy the following lines after that past into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code:

[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright © 2005-2006 www.globalguideline.com All rights reserved. Join Global Guide Line community. 450 visitors are online now