Alex Duffield wrote: > I would much prefer to have my javascript loaded dynamically with > each different component as needed instead of having to load up > everything when the app is originally loaded. > > I tryed including the JS code directly in the code returned by > Ajax.Updater as well as linking to it with: > <script type="text/javascript" src="/path/to/my_new_script.js"></script>
See my comments in ticket #3347. Basically, define your functions as: <script type="text/javascript"> window.myFunction = function() { alert('hi'); } </script> http://dev.rubyonrails.org/ticket/3347 Todd -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs