Forum: Ruby on Rails to het element's height and width

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3083ca8f0496edaac2fa10c20630d0bc?d=identicon&s=25 Newb Newb (newb)
on 2008-12-02 09:43
Hi...
i m trying to give my form opacity effect with external javascript.
In that i want to get div element's height and width.
My div width is fixed like 500px.
Height is not fixed one.
According to the content it ill be resized.
so i used like below
var dimensions = element.getDimensions();
so it gives me height and width.
but gives only in FIrefox.
It doesn't Work in IE 7.
so i want to know how can i get height and width of div in IE7.
and could u tell me whether the below code work in IE7 or not?
var dimensions = element.getDimensions();
Pls help ME

Online

Report | Delete | Edit | Quote
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2008-12-02 23:14
Newb Newb wrote:
> so i want to know how can i get height and width of div in IE7.

element.getHeight() and element.getWidth()?
3083ca8f0496edaac2fa10c20630d0bc?d=identicon&s=25 Newb Newb (newb)
on 2008-12-03 05:06
Shandy Nantz wrote:
> Newb Newb wrote:
>> so i want to know how can i get height and width of div in IE7.
>
> element.getHeight() and element.getWidth()?

But it doesn't work with IE7
This topic is locked and can not be replied to.