Hi all,
I found the solution using a regular expression. Hope it would be helpful to anyone facing the same problem.Following is my function code...rest code is same as above.
function validateAllSame(){
var newregex=/([0-9]+?)\1+/;
var y=document.form1.number.value;
if((!(newregex.exec(y))) ){
return true;
}
alert("wrong number");
return false;
}