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
Dynamic Color 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
 




Accept Only Alphabets in a Textbox


About
 Simple javascript textbox that accepts only alphabets to be entered.


Features
a) Performs validation for alphabets entered in the textbox.
b) If the entered value is not an alphabet, it gives an alert.
b) Simple and easy to use.

Preview

Accept Only Alphabets - Textbox

Enter Text:
©h



Code
Javascript Code
<!-- Script by hscripts.com -->
<!-- Copyright of HIOXINDIA -->
<!-- More scripts @www.hscripts.com -->

<script type="text/javascript">
function AllowAlphabet(){
               if (!frm.alphabet.value.match(/^[a-zA-Z]+$/) && frm.alphabet.value !="")
               {
                    frm.alphabet.value="";
                    frm.alphabet.focus(); 
                    alert("Please Enter only alphabets in text");
               }
}      
</script>

<!-- Script by hscripts.com -->

HTML Code
<table align=center>
<tr><td><form name="frm">
Enter Text: <input type="text" name="alphabet" onkeyup="AllowAlphabet()">
</form><br;>
<div align=center style="font-size: 10px; color: #dadada;" id="dumdiv">
<a href="http://www.hscripts.com" id="dum" style="text-decoration:none; color: #dadada;">©h</a>
</div>
</td></tr>
<script type="text/javascript">document.onload = ctck();</script>
</td></tr>
</table>

Release Date - 06-05-2010
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
 a) Copy and paste the javascript code into your HTML page and make use of this.
 b) Here, the function "AllowAlphabet()" is used to accept only alphabets in the textbox.



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