Hi,
it took me 3 hours to figure out this bug... actually the Gecko-Engine returns only the visible part of a DIV-Layer when you try to get its offsetWidth.
I spotted a workaround in the mozilla bugtracker, and used a function mentioned there to get around this bug... this works fine for me:
Code:
function getContentWidth(el){
var tmp=el.style.overflow
el.style.overflow='auto'
var w=el.scrollWidth
el.style.overflow=tmp
return w
}
function fillup(){
if (iedom){
crossmain=document.getElementById ? document.getElementById("motioncontainer") : document.all.motioncontainer
menuwidth=parseInt(crossmain.style.width)
mainobjoffset=getposOffset(crossmain, "left")
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery
document.getElementById("temp").innerHTML=cross_scroll.innerHTML //NEW stuff
actualwidth=document.all? cross_scroll.offsetWidth : getContentWidth(document.getElementById("temp"))
if (!window.opera) document.getElementById("temp").style.display="none"
crossmain.onmousemove=function(e){
motionengine(e)
}
crossmain.onmouseout=function(e){
stopmotion(e)
showhidediv("hidden")
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv()
positiondiv()
}
}
Greetz, Novalis
www.exanto.de
Bookmarks