Found the answer. This is the easiest way to make sure some javascript runs each time the list table is updated.
(1) Create a file called '_list.html.erb' either in the app/views/ <controller> name folder or in app/views/active_scaffold_overrides as per http://activescaffold.com/docs/template-overrides (2) In this file put the following: <script type="text/javascript"> // your javascript here </script> <%= render :super %> (3) Run your app If you're a HAML addict like me you'll have to switch back to ERB as putting a _list.html.haml file as the override has a weird effect and basically the special render :super command used to wrap the original partial doesn't work as intended. Thanks to Kenny & AJ for introducing me to some handy new javascript tools along the way. On Jan 27, 5:29 pm, Mat <[email protected]> wrote: > All these look pretty good, especially Sammy. > > I was expecting though to be told to use some kind of override to > inject my javascript call when the pagination updates the page via the > update_table method. > > I'll dig around with these three suggestions and see where it leads > me. > > Thanks > > On Jan 27, 2:23 pm, Kenny Ortmann <[email protected]> wrote: > > > > > or you could use lowpro,http://github.com/danwrong/low-pro/ > > > On Wed, Jan 27, 2010 at 2:56 PM, AJ ONeal <[email protected]> wrote: > > > Any ideas on how to make the javascript run each time the user goes to > > >> a new page? > > > > jQuery BBQ > > > jQuery Sammy > > > > AJ ONeal > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "ActiveScaffold : Ruby on Rails plugin" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<activescaffold%2bunsubscr...@go > > > oglegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/activescaffold?hl=en. -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
