Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Error with "city" input

Posts: 1
Registered: 3/24/2005
Member Is Offline
posted on 3/24/2005 at 12:29 AM Reply With Quote
Error with "city" input

I noticed there is an error if there is a city name two words. For example, inputting "New York" would give an error, but "New" would not. Does anyone know a fix for this?
View User's Profile View All Posts By User U2U Member
Junior Member

Posts: 5
Registered: 3/27/2005
Member Is Offline
posted on 3/27/2005 at 05:28 AM Reply With Quote
Already Posted

The solution to your problem has already been posted...but in case you didn't see it add these lines in the validation.js under "//check length"...I checked it out it works awsome.

else if (String(this.a_fields[n_key]['v']).length > 0) {
var space = ' ';
// assume that string is all spaces
var spflag = 1;
// loop through string and stop if anything other than white space found
for (var i=0; i < String(this.a_fields[n_key]['v']).length; i++) {
if (space.indexOf(String(this.a_fields[n_key]['v']).charAt(i)) == -1) {
spflag = 0;
if (spflag != 0) {
this.a_fields[n_key].n_error = 1;
View User's Profile View All Posts By User U2U Member

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 4/7/2005 at 02:41 PM Reply With Quote

or you can just replace one line in validator.js:

'alpha' : /^[a-zA-Z\.\-]*$/,



'alpha' : /^[a-zA-Z\.\-\s]*$/,
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum

Go To Top

Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004