2011-12-28 18 views
0

私はちょうどwww.werelate.org/wiki/Special:ListPages/Jdfoote1で最初のSlickGrid実装を終了しました。SlickgridフィルターがIEで動作しない

残念ながら、フィルタがIEで動作しないという報告が返されています。私は、SlickGridのフィルタリングに関する既知の問題がIE上にあるかどうか疑問に思っています。問題のコードは次のとおりです。

// Define search filter (currently searches name, birth place, and death place) 
function myFilter(item) { 
var searchWords = getWords(searchString); 
var searchFields = ["name","birthPlace","deathPlace", "birthDate", "deathDate"]; 
if (searchWords){ 
    // Go through each of the words in the search string 
    for (j in searchWords){ 
     var itemFound = false; 
     searchWord = searchWords[j].toUpperCase(); 
     // Make sure that the word is in at least one of the search fields. 
     for (i in searchFields){ 
      if (item[searchFields[i]].toUpperCase().indexOf(searchWord) != -1){ 
       itemFound = true; 
      } 
     } 
     if (itemFound === false){ 
      return false; 
     } 
    } 
} 
    return true; 
} 

// Get all of the words in a search string 
function getWords(wordString){ 
    pattern = /[^, ]+/g; 
    wordArray = wordString.match(pattern); 
    return wordArray; 
} 

非常に多くの感謝!

+0

Chromeではまったく動作しないようです。 JSエラーは報告されません。 – Tin

+0

申し訳ありません - これはコードのごく一部です。 – Jeremy

答えて

0

私はこの問題が私のforループであることを知りました。あなたがそのような配列をループすることはできませんので、私はIEだから形式でループ

for (variable=startvalue;variable<=endvalue;variable=variable+increment) 

を必要と推測し、私の

for (j in searchWords) 

は物事を破りました。おっとっと。 :)