Hi,
Can you please tell me if you see anything wrong in my function? It doesn't return true if the string tested contains spaces.
[HTML]
function hasWhiteSpace(s trg) {
var whiteSpaceExp=/^\s+$/;
if (whiteSpaceExp. test(strg))
return true;
else
return false;
}
[/HTML]
The string passed is that: document.form1. un.value where form1 is the name of the form and un is the name of the field.
Thank you
Can you please tell me if you see anything wrong in my function? It doesn't return true if the string tested contains spaces.
[HTML]
function hasWhiteSpace(s trg) {
var whiteSpaceExp=/^\s+$/;
if (whiteSpaceExp. test(strg))
return true;
else
return false;
}
[/HTML]
The string passed is that: document.form1. un.value where form1 is the name of the form and un is the name of the field.
Thank you
Comment