Hi there,
I'm lost in the 'match' method
I read and read and read about it but STILL can not figure how to build the argument of the characters to be compared!
I want the text input box to accept only english characters and numbers and a dash, how can I do it? Following is a part from my script:
CompareArgument = /-|[abcdefghijklmnopqrstuvwxyz]|[1234567890]/;
if (TextInput.value.match(CompareArgument))
alert ('OK');
else
alert ('NOT');
Please help.
If you need the full script please tell me
Thanx in advance
I'm lost in the 'match' method
I want the text input box to accept only english characters and numbers and a dash, how can I do it? Following is a part from my script:
CompareArgument = /-|[abcdefghijklmnopqrstuvwxyz]|[1234567890]/;
if (TextInput.value.match(CompareArgument))
alert ('OK');
else
alert ('NOT');
Please help.
If you need the full script please tell me
Thanx in advance