2010-02-05 84 views
0

我知道這個問題聽起來可能很模糊,但我一直在調試(PHP和js)我們的應用程序一天,並且沒有發現數據生成中的任何問題。Firefox 3.6不顯示內容 - xajax,jquery,css

我們的應用程序使用xajax根據我們在數據庫中的數據生成列表。我們有一個特別適用於所有其他瀏覽器的列表:IE 7 & 8,Firefox 3.0.13(Linux)和3.5.7(Win,Mac),Opera(Win),Chrome 4.0.249.30(Linux)和4.0。 249.78(贏),Safari(贏和Mac)。但是在Windows 7和Mac OS 10.6.2中的firefox 3.6根本不會生成這個列表。

當我使用Firebug包含列表的DIV完全是空的

<pre>< div id="listOutput">< /div></pre> 

」,當它應該包含爲l IST所有數據!

我不知道爲什麼這個問題可能會發生,並且爲什麼這可能發生的將是真正的幫助

任何線索謝謝

 


<div id = "listOutput" >
  <table class="list" >
    <tbody >
      <tr class="head" >
        <th class="noSort checkbox"><input id="selectAllRows" name="selectAllRows" title="Select all" type="checkbox" ></th>
        <th class="ID" onclick="xajax_displayPagination(0, 20, 'id', 'ASC', xajax.getFormValues('pageForm')); xajax_displaySearch(0, 20, 'id', 'ASC', xajax.getFormValues('pageForm')); xajax_displayList(0, 20, 'id', 'ASC', xajax.getFormValues('pageForm'));"><span id="DESC">ID</span></th>
        <th class="noSort option">option</th>
      </tr >
    </tbody >
  </table >
</div >

+0

你能提供什麼樣的標記看起來像其他Firefox的一個樣本? – adamJLev 2010-02-05 23:47:18

+0

好點:也許那個DIV應該是空白的(當你在其他瀏覽器中看它時)? - 它可能是動態的javascript'填充'它 - 而不是在DIV內完全形成的數據。你在3.6 Firefox上遇到任何javascript錯誤? – monojohnny 2010-02-06 00:33:26

+0

對不起,直到現在我還沒有回到過去。現在代碼正在顯示。 – Onema 2010-02-26 22:30:39

回答

0

xajax使用getBoxObjectFor(),請參閱https://developer.mozilla.org/en/Firefox_3.6_for_developers?如果確實如此,那可能是你的問題。我必須解決這個問題,因爲一旦FF 3.6出來了。我們的Infragistics網格在某些情況下不起作用,這是罪魁禍首。

下面是我所做的修復它。

請注意,我的解決辦法是一拉jQuery的

$(document).ready(function() { 
    if ($.browser.mozilla && !document.getBoxObjectFor) { 
     document.getBoxObjectFor = function(elem) { 
      var boundingRect = elem.getBoundingClientRect(); 
      var doc = elem.ownerDocument; 

      // top and bottom are not rounded off in Gecko1.9 
      // http://www.quirksmode.org/dom/w3c_cssom.html#elementviewm 
      var elemTop = Math.round(boundingRect.top); 
      var elemLeft = boundingRect.left; 
      var docElement = doc.documentElement; 

      // clientLeft and clientTop would be 0 for Gecko1.9 
      // https://bugzilla.mozilla.org/show_bug.cgi?id=174397#c34 
      elemLeft += docElement.scrollLeft; 
      elemTop += docElement.scrollTop; 

      return { x: elemLeft, y: elemTop, width: docElement.width, height: docElement.height }; 
     }; 
    } 
});