admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org
2007-Mar-13 21:21 UTC
script.aculo.us question
this may be painfully obvious, but I cannot find it and the more I dig the less I find. On the home page of script.aculo.us the logo switches from png to gif when IE loads. How did you do this? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
While I don''t know if this is how they did it, but I''ve done it usually with conditional comments used to change the CSS background-image of a div. That being said, you could use javascript something like this (clearly this is pseudo-code): Event.observe(window, "load", function() { if(browser is IE) { $("logo").replace("<img src=/path/to/gif/logo>"); } }); The browser detection might be the hardest part, but I''m sure Navigator.appName can be used to do it. -- Dash -- admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org wrote:> this may be painfully obvious, but I cannot find it and the more I dig > the less I find. > > On the home page of script.aculo.us the logo switches from png to gif > when IE loads. How did you do this? > > Thanks > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org a écrit :> On the home page of script.aculo.us the logo switches from png to gif > when IE loads. How did you do this?If there''s nothing client-side, I''d bet on Apache''s Content Negotiation module. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org
2007-Mar-14 00:21 UTC
Re: script.aculo.us question
On Mar 13, 5:42 pm, David Dashifen Kees <dashi...-NT0ononE2K1Wk0Htik3J/w@public.gmane.org> wrote:> While I don''t know if this is how they did it, but I''ve done it usually > with conditional comments used to change the CSS background-image of a > div. That being said, you could use javascript something like this > (clearly this is pseudo-code): > > Event.observe(window, "load", function() { > if(browser is IE) { > $("logo").replace("<img src=/path/to/gif/logo>"); > } > > }); > > The browser detection might be the hardest part, but I''m sure > Navigator.appName can be used to do it. > > -- Dash --Thanks. That is a little more straight forward than some of the other stuff I have found. I am having a hard time figuring out how they did it, I am beginning to think it is server side like the apache that is mentioned previously. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You don''t need navigator.appName now Prototype 1.5.1_rc0 has Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans On 3/14/07, admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org <admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org> wrote:> > > > > On Mar 13, 5:42 pm, David Dashifen Kees <dashi...-NT0ononE2K1Wk0Htik3J/w@public.gmane.org> wrote: > > While I don''t know if this is how they did it, but I''ve done it usually > > with conditional comments used to change the CSS background-image of a > > div. That being said, you could use javascript something like this > > (clearly this is pseudo-code): > > > > Event.observe(window, "load", function() { > > if(browser is IE) { > > $("logo").replace("<img src=/path/to/gif/logo>"); > > } > > > > }); > > > > The browser detection might be the hardest part, but I''m sure > > Navigator.appName can be used to do it. > > > > -- Dash -- > > Thanks. That is a little more straight forward than some of the other > stuff I have found. > > I am having a hard time figuring out how they did it, I am beginning > to think it is server side like the apache that is mentioned > previously. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Awesome! I haven''t looked closely at the release candidates yet. I prefer to just wait until the kinks are worked out. ''Course, I suppose I could help find those kinks, but I guess I''m just virtually lazy. Thanks! -- Dash -- Gareth Evans wrote:> You don''t need navigator.appName now > Prototype 1.5.1_rc0 has Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans > > > On 3/14/07, *admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org <mailto:admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org>* > <admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org <mailto:admin-GYZ9fCRu3rRVtLMLtJdGzA@public.gmane.org>> wrote: > > > > > On Mar 13, 5:42 pm, David Dashifen Kees <dashi...-NT0ononE2K1Wk0Htik3J/w@public.gmane.org > <mailto:dashi...-NT0ononE2K1Wk0Htik3J/w@public.gmane.org>> wrote: > > While I don''t know if this is how they did it, but I''ve done it > usually > > with conditional comments used to change the CSS > background-image of a > > div. That being said, you could use javascript something like this > > (clearly this is pseudo-code): > > > > Event.observe(window, "load", function() { > > if(browser is IE) { > > $("logo").replace("<img src=/path/to/gif/logo>"); > > } > > > > }); > > > > The browser detection might be the hardest part, but I''m sure > > Navigator.appName can be used to do it. > > > > -- Dash -- > > Thanks. That is a little more straight forward than some of the > other > stuff I have found. > > I am having a hard time figuring out how they did it, I am beginning > to think it is server side like the apache that is mentioned > previously. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---