I have made a custom lightbox. What matters is that it pops up saying Loading in a small div. I then set the visibility to hidden when I get the data to update. Next I update the div with $ (''innerDIV'').update(updateTxt);.I then reposition it to center on screen based on the height and width. Then I make it visible again. For some reason .update makes it visible before i manually do it. If I change the line to $(''innerDIV'').innerHTML = updateTxt; everything works perfect The code summary is this: $(''innerDIV'').style.visibility=''hidden''; //$(''innerDIV'').innerHTML = updateTxt; would make it work properly $(''innerDIV'').update(updateTxt); //will make it visible too soon so you see it flicker before reposition positionPopup(); //positions and then makes visible I need to use update to run some JS. I have checked that the JS does not make anything visible. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Try using Elemewnt.hide(''innerDIV'')> $(''innerDIV'').style.visibility=''hidden'';--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yeah, normally you don''t want to do visibility: hidden, that keeps the element in the layout, just doesn''t show it. And that''s Element without the ''w''. ;-) On Wed, Jun 4, 2008 at 2:14 PM, Diodeus <diodeus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Try using Elemewnt.hide(''innerDIV'') > > > $(''innerDIV'').style.visibility=''hidden'';-- Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Yeah, normally you don''t want to do visibility: hidden, that keeps the > element in the layout, just doesn''t show it.He''s doing that so that the dimensions of the element can be calculated. Element.getDimensions() already does this though, if an element is hidden. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The element I am changing is absolutely positioned so it doesn''t matter that it takes up space on the page still - no one can tell. I am using visibility, as Justin said, to calculate while user can''t see it. Does this seem like a glitch? I don''t understand why update would be affecting my style settings. On Jun 4, 3:44 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Yeah, normally you don''t want to do visibility: hidden, that keeps the > > element in the layout, just doesn''t show it. > > He''s doing that so that the dimensions of the element can be calculated. > > Element.getDimensions() already does this though, if an element is hidden. > > -justin--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Why aren''t you just using getDimensions()? It does all that work of setting the visibility to hidden if display is set to none so that the dimensions can be determined. No need to reinvent the wheel here. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eh I found the answer after much frustration. You see I started reworking my lightbox and was testing on the worst page possible it would seem. One of my popups has a command in EXT. For some reason EXT is making the layer visible so that is my problem. I am going to look into it now. Sorry about that. On Jun 4, 4:11 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Why aren''t you just using getDimensions()? It does all that work of > setting the visibility to hidden if display is set to none so that the > dimensions can be determined. > > No need to reinvent the wheel here. > > -justin--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---