Hi *, both scriptaculous and prototype are quite big, and I don''t use all the goodness inside there, including :defaults is a bit too much for me. Someone knows of a way to dynamically load what''s effectively used inside a side ? It would be a great feature ... ngw -- Nicholas Wieland nicholas.wieland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Do you mean load dynamically on the client side? If so, can''t say i''ve heard any tricks to achieving this, what you could do is compress the files, this will help reduce the size. Also I was under the impression that by default most browsers cache javascript so I guess you could see it as just the one download. But i could be wrong. Hope this helps Also if you choose a different javascript library consider moo tools which allows you to choose only options you want. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I came across this a while ago, I was already loading javascript details and then added mapping code as well. I was using Virtual Earth maps as Google Maps are crap for Ireland. In order to only have one layout file but still only load the mapping code on the pages where I need it, I added an <%= @mapcode -%> to the layout. Then in my controller I can only set the @mapcode when I want it set. @mapcode = get_mapcode private def get_mapcode code = " <script src=\" http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js\"></script>" end Not quite what you are looking for but it does the trick for me. Keith On 4/4/07, Camo <csinge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Do you mean load dynamically on the client side? > > If so, can''t say i''ve heard any tricks to achieving this, what you > could do is compress the files, this will help reduce the size. Also > I was under the impression that by default most browsers cache > javascript so I guess you could see it as just the one download. But i > could be wrong. Hope this helps > > Also if you choose a different javascript library consider moo tools > which allows you to choose only options you want. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---