Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-20-2005, 05:07 PM   PM User | #1
sushestvo
New Coder

 
Join Date: Jul 2005
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
sushestvo is an unknown quantity at this point
check if input type="text" has a symbol

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.
sushestvo is offline   Reply With Quote
Old 09-20-2005, 07:13 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,043
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
if (/\'/g.test(thefieldName.value)) {
alert ("You have typed an apostrophe!")
}
Philip M is offline   Reply With Quote
Old 09-20-2005, 07:22 PM   PM User | #3
sushestvo
New Coder

 
Join Date: Jul 2005
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
sushestvo is an unknown quantity at this point
Quote:
Originally Posted by Philip M
if (/\'/g.test(thefieldName.value)) {
alert ("You have typed an apostrophe!")
}
Thank you so much!!!
sushestvo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:26 AM.


Advertisement
Log in to turn off these ads.