Search code examples
ruby-on-railsrubyprototypejsrjs

calling application prototype js function from rjs


Is it possible to call an application level prototype JavaScript function from rjs? I wanna call a function to perform certain tasks after my ajax call. How am i supposed to do it?


Solution

  • At your RJS template:

    page.call( "functionName", 1, "something", "whatever" )