最近推出了Magento的商店爲特色的網頁上的圖像滑塊。在Firefox,Chrome等中完美工作,但像往常一樣,IE9導致的問題 - 奇怪的是,這是在IE瀏覽器中工作,所以不知道是什麼導致它停止運作。IE9 JS無法獲得屬性「顯示器」的值:對象爲空或未定義
既然這樣,在IE9,它不能檢測的圖像的範圍在滑塊(僅顯示第一序列中),隨後不任何地方滑動。
在IE9開發者模式,錯誤是: -
=======#
SCRIPT438: Object doesn't support property or method 'dispatchEvent'
prototype.js, line 5734 character 7
代碼片段:
5733 if (document.createEvent)
5734 element.dispatchEvent(event);
5735 else
5736 element.fireEvent(event.eventType, event);
=======#
And ...
======= #
SCRIPT5007: Unable to get value of the property 'display': object is null or undefined
prototype.js, line 2542 character 5
代碼片段:
2538 else if (Prototype.Browser.IE) {
2539 Element.Methods.getStyle = function(element, style) {
2540 element = $(element);
2541 style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
2542 var value = element.style[style];
2543 if (!value && element.currentStyle) value = element.currentStyle[style];
=======#
在Magento(1.6.2.0),我們使用最新版本的prototype.js的(1.7 )。
我們還添加了IE的標準模式的頭部......
<!-- Enable IE8 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=8" >
類似的錯誤會出現在Firefox和Chrome,但他們似乎並沒有影響功能。
請任何人都可以像實物拍攝的,其中的問題可能是因爲我不能確定修復什麼的外觀和建議。網站中的問題是事先http://www.showermania.co.uk/
感謝。
可能是試圖隱藏元素或更改不存在於你的DOM元素的顯示狀態,所以不看原型錯誤,但你自己代碼 –
嗯,好吧。不是我的代碼,因爲它是第三方擴展。並且正在工作,事實上 - 這裏是在開發工作在IE9(http://004sm.clubnetdev.com/)上的網站 - 完全相同的代碼... – zigojacko
你明白,它不完全相同,如果它是在一個工作,而不是在其他:) –