JavaScript Scripts





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Calendar Script Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators
 




Alphanumeric Validation Function


About
This script function will help you to validate a string / character for alphanumeric values.


Features
a)The javascript function will return false when the string that is passed contains character other than alphanumeric.
b)It returns true on correct validation.
c)Just copy the code in to your page and use it.

Preview
Alpha numeric Testing :
Enter a character / string and test it
[ e.g: alfha or alp#num]


Code
<!-- Script by hscripts.com -->
<script type="text/javascript">
function alphanumeric(alphane)
{
	var numaric = alphane;
	for(var j=0; j<numaric.length; j++)
		{
		  var alphaa = numaric.charAt(j);
		  var hh = alphaa.charCodeAt(0);
		  if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123))
		  {
		  }
		else	{
                         alert("Your Alpha Numeric Test Failed");
			 return false;
		  }
 		}
 alert("Your Alpha Numeric Test Passed");
 return true;
}
</script>
<!-- Script by hscripts.com -->

Release Date - 15-12-2004
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at support@hscripts.com


Usage
Here we have explained with a form
a)Creating the form using following HTML code
    <form name="test" onSubmit="return alphanumeric(test.mailf.value)">
    <input name=mailf type=text>
    <input type=submit value=validate>
    </form>
b)The alphanumeric() function is triggered on submission of the form.
c)Just copy the javascript code and use it for free.




License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting