Tobias Haagen Michaelsen
2007-Mar-14 12:17 UTC
SV: [Rails-spinoffs] Re: script.aculo.us question
Another option would be to use conditional comments, which is only supported in
IE. Either in the javascript:
/*@cc_on @*/
/*@if (@_win32)
Event.observe(window, ''load'', ...(replace img)...);
/*@end @*/
Or in the HTML for including the script (this support checking versions):
<!-[if lt IE 7]>...include script...<![endif]-->
-Tobias
________________________________
Fra: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-spinoffs@googlegroups.com] På vegne af David Dashifen Kees
Sendt: 14. marts 2007 04:02
Til: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Emne: [Rails-spinoffs] Re: script.aculo.us question
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
<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
-~----------~----~----~----~------~----~------~--~---
