Hi Julien, On Thu, 2009-06-11 at 20:24 +0200, Julien Julien wrote: > I'm researching a project that uses a system component loaded on the > page through a custom JS file.
I'm having a little trouble understanding exactly what you're trying to do. I'll take a stab, but in case i totally misunderstand you, i'll ask a few questions that, if my response is no help, may make it easier to ask again. For starters, what's a 'system component'? And whatever it is, is this the thing that you want go get loaded when the user takes some action? > On defined user actions, So we're talking about clicking a link or a button? > this component will call a definable JS method, Definable? As in 'not known until run-time'? > that i'd like to act in a link_remote_to fashion, to update some > elements of the page. link_to_remote(...) makes an XHR / XMLHttpRequest to a controller method on the server. In Rails you have several options WRT constructing the JS response the client expects. The easiest is an RJS template that replaces existing html element(s) on the page. I highly recommend Cody Fauser's O'Reilly Shortcut: RJS Templates. Best $10 I've spent on Rails so far. link_to_function(...) calls a JS function you specify in the call. Write back if that doesn't help. Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---