Hi,

I want to compare the text value present in the Array and the text that user is entering from either dynamically or from the text data(excel).

can you help me out in this regard using java script.
code is as :
var InvalidCommand = new Array('auth','freset','model','profile','reset','saveconfig','selectchanconfig','setapproxtime','sof tloadreset','sreset');
var Length = InvalidCommand.length()-1;
test.log('Length'+Length);
var Command =Length-1;
snooze(3);
test.log('length..'+Command);
for (var i=0; i< Command ;i++)
{
test.log("n the for loop...");
//if value is equal to element
if (Text.indexOf(InvalidCommand[i])!=-1)
{
test.log("text..."+Text.indexOf(InvalidCommand[i]));
test.log("valid elements");
return false;
}
else
{
test.log("invalid elements");
return true;
}
}