re-running js after ajax call

Ok, so say you have a page, and when it loads, it runs everything in application.js.

Here, there is some code in between: Event.observe(window, 'load', function(){

   // Code goes here.

})

Does anyone know, how you could get the same code to run, after responding to certain ajax calls?

For example, someone clicks on one of the link_to_remote links on the page, a call is made, and the js code in application.js is run again.

Is this possible?

Well you've got a bunch of callbacks with link_to_remote (:complete, ;success, :failure etc...) Will those do?

Fred

That's exactly what I needed! *Smacks head*

Thank you.