Create 2 new arrays.
Then as you are looping through the form values, use one array to store the non-duplicate values and the other to store the duplicate values.
To find out if a value is a duplicate, write a function which checks the non-duplicate array for the same value. If it's not present add it to that array, otherwise add it to the duplicate array (or, if you want to identify the form text box which contains the duplicate values, store the i value instead).
Read about arrays here.
Here is my revised code, what is the error in this code? I can't pass the value to the arr[0]. I I can pass the value entered to the arr[0] the next time the user will input the value, it will check if there's a value stored in an array, so that alert message will prompt for the duplicate value. Thanks.
function check_Duplicate()
{
with(document.form)
{
var arr = new Array()
arr[0] = 0
for (i=0; i < hidNoOfProcess.value ; i++)
var propVals = document.getElementById("txtSeries" + i ).value
arr[0] = propVals
if( propVals == arr[0] ) {
alert("This is a duplicate value" +
"\n Please create another" );
return false;
}
}
}