Hi Hemanth,
use the following code for your requirement:
<script language=vbscript>
sub txt1_onkeypress
lgt = Len(f1.txt1.value)
val = f1.txt1.value
if lgt > 0 then
if IsNumeric(right(val,1)) then
f1.txt1.value = Left(val,lgt - 1)
MsgBox "Only Characters Please",,Information
else
for i = 0 to 64
if right(val,1) = chr(i) then
f1.txt1.value = Left(val,lgt - 1)
MsgBox "No Special Characters Please",,Information
exit sub
end if
next
for j = 91 to 96
if right(val,1) = chr(j) then
f1.txt1.value = Left(val,lgt - 1)
MsgBox "No Special Characters Please",,Information
exit sub
end if
next
for k = 123 to 255
if right(val,1) = chr(k) then
f1.txt1.value = Left(val,lgt - 1)
MsgBox "No Special Characters Please",,Information
exit sub
end if
next
end if
end if
end sub
sub txt1_onkeyup
txt1_onkeypress
end sub
</script>
<form name=f1 id=f1 action="" method=post>
<input type=text name=txt1 id=txt1>
<input type=submit name=submit1 value=Submit>
</form>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/