Why LOOP is terminating right away?
<p>I am seraching a match in a string by using search function, say like below JS......say, 1st result is found,well.......2nd is found, well....3rd id not found, then the control/cursor is coming out of the loop, i mean, right away the loop is terminating, i thought the ELSE condition is gonnna trigger and continues the iteration until the end of the length...but in the middle its terminating! Pls. suggest me either fix or provide a new JS, Thank you</p>

<pre><code>// OriginalFields is a string, its fillled with fields list with space seperator
myArrayGrey = greyFields.split(" ");
for (var i = 0; i &lt; myArrayGrey.length; i++) {
    var returnValue = OriginalFields.search(myArrayGrey[i]);
    if (returnValue != -1) {
        //grey the field 
        // and
        // make access = "readOnly";
    };
    else {;
        // do nothing
        // just for my testing am doing app.alert (not found)
    };
};​
</code></pre>
