# RJS and EXTjs component update (RAILS 1.2.3)

**URL:** <https://www.ruby-forum.com/t/rjs-and-extjs-component-update-rails-1-2-3/130622>\
**Category:** Rails\
**Created:** [February 29, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/rjs-and-extjs-component-update-rails-1-2-3/130622 "2008-02-29T22:30:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin\_cline](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3d9bf3/32.png) [@kevin\_cline](https://www.ruby-forum.com/u/kevin_cline)\
**Post date:** [February 29, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/rjs-and-extjs-component-update-rails-1-2-3/130622/1 "2008-02-29T22:30:48Z")

</div>

I want to use an RJS view to update EXT Panel bodies. But since the  
panel bodies  
have generated element ids, I can’t see how to use  
‘page.replace\_html’.

So instead I wrote a javascript function ‘updateBody’.

In the RJS view, I want to say something like:  
page.call ‘updateBody’, ‘some\_panel’, :partial =\> ‘my\_partial’

I looked at the source for replace\_html, and then tried:  
page.call ‘updateBody’, ‘some\_panel’, page.render(:partial =\>  
‘my\_partial’)

but that doesn’t work, and neither does:  
page.call …, render\_to\_string(…)

Rendering the partial in the controller  
@rendered\_partial = render\_to\_string :partial =\> ‘my\_partial’  
does work, but it seems that there should be something easier.
