@Sebioff I do agree with you that what you did is expected to work. I think the problem relies on the fact that jQuery (and Dimensions) always check like this:
if( elem == window || elem == document ) ..............; And the problem is sometimes there're more than one window or document (when using frames, iframes, or popups) I think that should be done with of object detection.. Something like: (just a proof of concept) if( elem.scrollBy )//a window ......; if( elem.nodeName == '#document' )//a document ......; That makes code quite dirtier, but more functional. Cheers Ariel Flesler On 31 ene, 19:34, Sebioff <[EMAIL PROTECTED]> wrote: > Uh, allright, I'm sorry...I guess I found a solution. > The trick is to wrap the content in a span, and then retrieve the > spans height. > But still, I guess if contents().height() (which sounds so logical to > retrieve the contents height, don't you think) works in Internet > Explorer it should work in Firefox as well (or it shouldn't give any > nasty exceptions, at least)... > > If someone got an even easier way than the span-wrapping I'd be glad > to hear about! > > On 31 Jan., 22:14, Sebioff <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > i've got a div with overflow:auto. > > I want to check whether the content of the div is higher than the div > > itself (in order to know whether I need to show a "scrolldown" link > > or not). > > > In Internet Explorer with jQuery 1.2.2. I can get the contents height > > without any problem with: > > $("#div").contents().height() > > > (I don't know if this is the best way to do it, but it's the only one > > I found...) > > The problem is, in Firefox it doesn't work and all I get is the > > following error message: > > > Fehler: [Exception... "Could not convert JavaScript argument" > > nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS > > frame ::http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js:: > > anonymous :: line 853" data: no] > > Quelldatei:http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js > > Zeile: 853 > > > You can try it out yourself > > here:http://www.rakuun.de/Stuff/Schasler/content_height_test.html > > > Any idea how to fix this or how to get the contents height in a way > > that works in both browsers?- Ocultar texto de la cita - > > - Mostrar texto de la cita -