# Rjs

**URL:** <https://www.ruby-forum.com/t/rjs/115910>\
**Category:** Rails\
**Created:** [September 30, 2007, 7:56am UTC](https://www.ruby-forum.com/t/rjs/115910 "2007-09-30T07:56:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2007, 7:56am UTC](https://www.ruby-forum.com/t/rjs/115910/1 "2007-09-30T07:56:05Z")

</div>

Ok I am very new too this so I apologize if I do not explain myself  
correctly. I have for the past day been trying to use respond\_to to no  
effect. Explicitly the respond\_to |format|  
format.js.

Now I know he problem has to do with the fact that there is both an  
rhtml and a rjs with the same name. but I have found no reference for  
how to formate respond\_to correctly for js nor why this is a problem.  
I have tried a regular link\_to\_remote with similar results.

example page.rhtml  
contains  
link\_to\_remote ‘?’, :url =\> { “action” =\> “page” }

it works if I change the name for the rjs…so it simply a matter of  
duplication. But I can’t figure out what effecting rails to cause this  
problem.

I would appreciate any help on this matter.
