In my code I have an Ajax.Updater call this.makePeriodicalUpdater(''mydiv,postback.php'',''post'','''',''false''); then after the call I alert the element.GetHeight() alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 0 then i do the same alert alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 290 which is the height of my div If I place an alert before these alerts like alert(''hello''); the first alert returns a value as well. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe the content is not yet loaded when first statement executes? - kangax On Apr 21, 3:31 pm, seran128 <jeff....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> In my code I have an Ajax.Updater call > > this.makePeriodicalUpdater(''mydiv,postback.php'',''post'','''',''false''); > > then after the call I alert the element.GetHeight() > > alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 0 > then i do the same alert > alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 290 > which is the height of my div > > If I place an alert before these alerts like alert(''hello''); > > the first alert returns a value as well.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey! That''s some good thinkin'' there kangax! - blechler On Apr 21, 4:12 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe the content is not yet loaded when first statement executes? > > - kangax > > On Apr 21, 3:31 pm, seran128 <jeff....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > In my code I have an Ajax.Updater call > > > this.makePeriodicalUpdater(''mydiv,postback.php'',''post'','''',''false''); > > > then after the call I alert the element.GetHeight() > > > alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 0 > > then i do the same alert > > alert(''Div Height''+Element.getHeight(''myDiv'')); // It returns 290 > > which is the height of my div > > > If I place an alert before these alerts like alert(''hello''); > > > the first alert returns a value as well.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---