I have this code:
but when I add the "=" sign to the valid parameter I get an error.
Why would the = sign won't work?
Thanks.
Code:
var valid = "abcdefghijklmnopqrstuvwxyz0123456789-.:?&/"
var ok = "yes";
var temp;
for (var i=0; i < document.m.site_url.value.length; i++) {
temp = "" + document.m.site_url.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("not good");
document.m.site_url.focus();
document.m.site_url.select();
return false;
}
Why would the = sign won't work?
Thanks.