From: Simon D. M. <di...@bi...> - 2000-11-24 15:18:19
|
> The problem I've come across is this on the Mac IE 5 getContentHeight > returns as "NaN" a little exploration and it turns out that > "this.elm.scrollHeight" which the getContentHeight() call uses returns > "undefined". Other properties of the "elm", such a visibility return just > fine. When I create a layer the standard way right in the HTML > and query the > scrollHeight Mac IE 5 returns the correct value. It may be a matter of > timing as when I query the scrollHeight, but I do have the layer existing > via the addChild call and as I said it works on all the other browser > platform setups so I'm stumped. Any ideas? Have you fixed this problem with .elm.scrollHeight yet? If not, you say that you have wrapping in the layer so I guess you may have tables in them. If so you could get the height of the tables instead. Something like: MenuOption.prototype.MenuOptiongetContentHeight=DynLayer.prototype.getConten tHeight MenuOption.prototype.getContentHeight=function(){ if(is.ie)return this.elm.children[0].clientHeight else return MenuOptiongetContentHeight() } Maybe this would fix your problem, if not DynAPI's. I found that on IE5/Win, if you reduce the size of the content of a layer, .elm.scrollHeight doesn't register it. Don't know about other versions/platforms. Maybe you could try .elm.offsetHeight - it doesn't work any better than .elm.scrollHeight on IE5/Win but it works differently on a Mac. > Okay I'm building a menuing system using DynAPI, everything is > working great > on window ie v5 and netscape v4, and mac netscape v4 but in testing the > thing out on mac ie 5 I've run into an annoying problem. > > The menu is being built on the fly, I'm never sure how many lines of text > will be in a menu entry because of the length of some item we > wrap the text. > Also the system is such that images can be substituted in for > HTML text and > it will work just fine, again image size from entry to entry may vary. So > I've built the system such that each menu item is its own layer and as the > content is added to the layer the height of the layer is determined using > "getContentHeight()" and this value is tracked by the menu > manager so it can > work out where to position then next menu item. > |