Hi All,
I can not get the following
string declared in
java in java script.
here is the code,
function isVaildAddress(addVal, helperMsg,min, max){
<%splChars = "/[\"<^>&\'\\]/";%>
var splChars = "<%=splChars%>";
alert(splChars);
var retVal = true;
var i = addVal.search(splChars);
if(i != -1){
alert(helperMsg + " should not contain the following special characters : " +splChars);
retVal = false;
}
if(addVal.length >= min && addVal.length <= max){
retVal = true;
}else{
alert(helperMsg + " will allow " +max+ " digit alphanumeric only");
retVal = false;
}
return retVal;
}
but the alert shows only
/["<^>&'\]/
it throws Script error for incomplete the regex expression
Any one can help me to assign the actual string value.