...

View Full Version : check if input type="text" has a symbol



sushestvo
09-20-2005, 06:07 PM
so i have regular input field.
how can i check if use inputs an apostrophe there?
so that if they do, i would alert("them") ?
i hope someone can help.
thanks.

Philip M
09-20-2005, 08:13 PM
if (/\'/g.test(thefieldName.value)) {
alert ("You have typed an apostrophe!")
}

sushestvo
09-20-2005, 08:22 PM
if (/\'/g.test(thefieldName.value)) {
alert ("You have typed an apostrophe!")
}
Thank you so much!!! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum