![]() |
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| Scripts and Coding PHP, MySQL, scripts |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
![]() | javascript check form
I've got a bit of javascript to to check a field in a form on my web page. It's a competition so I need to make sure the visitor types it in correctly. the javascript to check the 'answer' field is Code: if (form.answer.value != "brabantia") {
alert( "oops! try again?" );
form.answer.focus();
return false ;
}
return true ;
} I'd like to add some kind of other check for "Brabantia" too. The javascript needs to return true whether the visitor enters 'brabantia' or 'Brabantia' Any help? Phil |
| |
| | #2 (permalink) |
| Member | PHP Code: Probably I would use match() http://www.w3schools.com/jsref/jsref_match.asp with a case-insensitve regular expression. |
| |
| | #3 (permalink) |
![]() |
Thanks JDubya I haven't tried that yet but I did solve the problem Instead of the javascript checker checking for lower and upper case I simply converted any uppercase to lower first in the html form on the page. I used... Code: onChange="javascript:this.value=this.value.toLowerCase();" |
| |
| | #4 (permalink) |
![]() | |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Domain Name Community | Replies | Last Post |
| Dynamic form generator/script? | wb | General Board | 2 | 12-04-2010 11:03:58 PM |
| Domain Name Industry Reality Check! Domain Valuations, Domain ... - Domain informer | RSS | Domain Name News | 0 | 21-01-2009 10:59:24 AM |
| How Famous is your Domain? Free Online Domain Check Tool - Pressemeldungen.at (Presse | RSS | Domain Name News | 0 | 20-10-2008 07:59:06 PM |
| Contact Form Help | DB | Website Design | 2 | 26-11-2006 02:43:52 PM |