From: Rob R. <ro...@ma...> - 2000-11-21 21:20:19
|
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. 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? Thanks, Rob Romanek |