title: javascript search function not working in IE
body: <p>Hey All I have this javascript function that actively searches a table I have on my web page. The function working in Mozilla and Chrome but not in IE. Can anyone help me tweak this so it will work in all browsers? here is the code:</p>
  
  <pre><code>function playerSearch(phrase, _name){
      var words = phrase.value.toLowerCase().split(" ");
      var table = document.getElementsByName(_name)[0];
      var ele;
      for (var r = 1; r &lt; table.rows.length; r++){
         ele = table.rows[r].innerHTML.replace(/&lt;[^&gt;]+&gt;/g,"");
          var displayStyle = 'none';
          for (var i = 0; i &lt; words.length; i++) {
              if (ele.toLowerCase().indexOf(words[i])&gt;=0)
                  displayStyle = '';
              else {
                  displayStyle = 'none';
                  break;
              }
          }
          table.rows[r].style.display = displayStyle;
      }
  }
  </code></pre>
  
  <p>Here is the function call from the html page: 
      <code>&lt;span id="filter" class="filter"&gt;Player Search:&lt;input onkeyup="playerSearch(this, 'currentTable')" type="text"&gt;&lt;/span&gt;</code></p>