i implemented lightbox js for a gallery page, but the first time an image is clicked and loaded, the "action" does not launch, but instead just a white page with the image. I have to click browser refresh for the feature to "take". can anyone advise? thank you! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ve encountered that same problem, and also haven''t had a chance to look into it. If anyone has, it would be nice to know. I assume it will involve activating the event behavior with JS in the onclick event. It seems like the behavior is activated in an onload event, but like I said, haven''t looked into it. On 6/17/07, new2js <artncd-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > > i implemented lightbox js for a gallery page, but the first time an > image is clicked and loaded, the "action" does not launch, but instead > just a white page with the image. I have to click browser refresh for > the feature to "take". > > can anyone advise? > > thank you! > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I believe it occurs when the page has not yet finished loading/interpreting the javascript that''s going to be used to create the lightbox effect. As a result, the link -- which points to the image that will load -- just goes directly to that image rather than being "cut off" by the javascript and shown in a lightbox. I''ve solved the problem by showing the images using javascript after the rest of the page loads using the Event.observe(window, "load", function() { ... }) paradigm. - Dash - new2js wrote:> i implemented lightbox js for a gallery page, but the first time an > image is clicked and loaded, the "action" does not launch, but instead > just a white page with the image. I have to click browser refresh for > the feature to "take". > > can anyone advise? > > thank you! > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---