The script that I have mentioned will definitely help you.
Code:
<script language="JavaScript" type="text/javascript">
{
var fname=document.Form1.getElementById("f_name").value;
var chkok="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
var chkstr=document.Form1.fname.value;
var allvalid=true;
for(i=0;i
{
ch=chkstr.charAt(i);
for(j=0;j
if(ch==chkok.charAt(j));
break;
if(j==chkok.length)
{
allvalid=false;
break;
}
}
if(!allvalid)
{
alert("Please enter only Characters");
document.Form1.fname.focus();
return false;
}
Bookmarks