Ok, This is driving me nuts. I am trying to determine the height of an element in IE, but offsetHeight returns undefined. I looped through all of the attributes that contain the word ''height'', both in the element and in the element.style, but they are all undefined. Is there a better way to determine the rendered height of an element? Is there something I need to do to the element so that the offsetHeight gets calculated? Any help would be appreciated. Looking through the scriptaculous and prototype functions, it seems they all rely on offsetHeight and have no alternate means of determining it. Am I just SOL? Greg
I think it was because I had position: absolute on the element. How that makes it not have a height in IE is beyond me, but I was able to work around the whole issue by changing the position attribute to relative, eliminating the need to even know the height after all. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill > Sent: Thursday, January 19, 2006 11:31 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] how can I get offsetHeight in IE? > > Ok, > This is driving me nuts. I am trying to determine the height of > an element in IE, but offsetHeight returns undefined. I loopedthrough> all of the attributes that contain the word ''height'', both in the > element and in the element.style, but they are all undefined. Isthere> a better way to determine the rendered height of an element? Is there > something I need to do to the element so that the offsetHeight gets > calculated? Any help would be appreciated. Looking through the > scriptaculous and prototype functions, it seems they all rely on > offsetHeight and have no alternate means of determining it. Am I just > SOL? > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Only thing I can think of is it might have something to do with the hasLayout property... is that set to true? It''s an IE internal prop that cannot be set explicitly... http://www.satzansatz.de/cssd/onhavinglayout.html -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Thursday, January 19, 2006 12:31 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] how can I get offsetHeight in IE? Ok, This is driving me nuts. I am trying to determine the height of an element in IE, but offsetHeight returns undefined. I looped through all of the attributes that contain the word ''height'', both in the element and in the element.style, but they are all undefined. Is there a better way to determine the rendered height of an element? Is there something I need to do to the element so that the offsetHeight gets calculated? Any help would be appreciated. Looking through the scriptaculous and prototype functions, it seems they all rely on offsetHeight and have no alternate means of determining it. Am I just SOL? Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.