Topic: Element Update and render from Javascript

I want use Ajax reload('idname') from a javascript. Is it possible? or can i do the combination of  Element.update and render in javascript. Say some think like this.

Element.update("comment_list",render('partial','comments/list'));

This code is BS but to give an idea what i am trying to accomplish.

Re: Element Update and render from Javascript

Javascript doesn't know how to render a partial - that is server side. You need to place the contents of the partial in a string.

Railscasts - Free Ruby on Rails Screencasts

Re: Element Update and render from Javascript

You can have the client use Javascript to call an action on the server that returns an RJS template to update the element.

Toby Hede
===================================================
FiniteStateMachine - Software Development for Social Networks
===================================================