HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 20th, 2004, 10:10 AM
clipper clipper is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 35 clipper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Javascript validation

I have a text box and want to validate it so that it contains only the values a-z OR I-XXX. How do I do this?

Reply With Quote
  #2  
Old July 21st, 2004, 10:30 PM
mathew_conte's Avatar
mathew_conte mathew_conte is offline
this time, it's not kitty
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Ontario, Canada
Posts: 435 mathew_conte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 23 m 25 sec
Reputation Power: 5
var regEx = /[a-z]/

function checkField(value)
{

if (value.match(regEx))
{
return true;
}

elseif value = "I-XXX"
{
return true;
}
else
{
alert( “Not a valid value!” );
return false;
}


}

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Javascript validation


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway