http://www.evergray.com/ph7/test.html
The idea behind this script is that a user types a country in the first field, and the textarea matches countries beginning with the user input.
(e.g. user types "Un" and the script should match "United States, United Kingdom, United Arab Emirates, etc');
It partially works, however it doesn't match certain countries and I'm at lost for figuring out why. If you type "U", you get:
Uganda
United Arab Emirates
United States
Uruguay
but not Ukraine
Typing "Un" doesn't match "United Kingdom" unless you type "United "
My regular expression is this:
var testreg = eval("/~"+which+"[- a-zA-Z,\\.]*~/igm");
(which is the value from the form), and the ~ are seperators between values
the rest of the code is in the URL above.
Help would be greatly appreciated!
Cheers :)