# :action through .rjs template?

**URL:** <https://www.ruby-forum.com/t/action-through-rjs-template/85185>\
**Category:** Rails\
**Created:** [February 11, 2007, 12:13am UTC](https://www.ruby-forum.com/t/action-through-rjs-template/85185 "2007-02-11T00:13:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rails\_junkie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@Rails\_junkie](https://www.ruby-forum.com/u/Rails_junkie)\
**Post date:** [February 11, 2007, 12:13am UTC](https://www.ruby-forum.com/t/action-through-rjs-template/85185/1 "2007-02-11T00:13:09Z")

</div>

Hello All,

I have a nooby question again.  
Here is what I am trying to do: I have a DIV object which shows my  
‘list of items’. If users click on link ‘Add Item’, i fade out another  
DIV which is data entry screen. Now user enter data hit ‘save’ . Once  
Saved. I need to show ‘New Saved Items’ instead of ‘List of Items’ .  
What would the best way to do this? I am was trying to use RJS  
template since it involves fading ‘list of items’ and retrieving/  
showing 'New Saved Items ’ .  
I have an action ‘NewSavedItem’ which need to be invoked to retrieve  
the list with one paramter :userId.

So far in my ‘addItem’ Action, after saving the item, I have code  
redirect\_to :action =\>“refresh” ,:uid=\>@userId  
where ‘refresh’ is my rjs template.  
In rjs temmplate i hide the ‘list of itms’ which works fine but i am  
not sure how to call the action ‘newSavedItem’ to retrieve the new  
items.  
Any ideas please?  
thank you
