2013-03-08 69 views
0

在我的php類中,我創建了一個連接選擇表單的方法(ajax調用) 現在我遇到了一個奇怪的問題,因爲在firefox,chrome和其他瀏覽器中,方法 很好地顯示行我的查詢選擇,而在ie 8-9沒有顯示行,但只有一個「白色」窗口。查詢不在IE上顯示行

public function ShowCat_2($idca2, $idca1) { 

    // for edit function 
    $where = ""; 
    if(isset($idca1)){ $where .= " idcat_1='$idca1'"; } 
    if(isset($_POST['idcat_1'])) { $where .= " idcat_1='$_POST[idcat_1]'"; } 

    // query  
    $this->db->result = $this->db->mysqli->query("SELECT * FROM cat_2 WHERE $where"); 
    $cat_2 = '<option value="0">Select</option>'; 

     while($row = $this->db->result->fetch_assoc()) { 

      $cat_2 .= '<option value="' . $row['idcat_2'] . '"'; 

       if($idca2 == $row['idcat_2']){ $cat_2 .= ' selected'; } // for edit fun 

      $cat_2 .= '>' . utf8_encode(ucfirst(strtolower($row['descr']))) . '</option>'; 

     } 

    return $cat_2; 
} 

你能告訴我可能是什麼問題,以及如何解決? 謝謝

回答

0

看看頁面源代碼。在那裏可能會有一個PHP警告/通知,它違反了HTML代碼。

+0

好的,謝謝。我發現錯誤。 – 2013-03-08 10:00:04