# RJS from .rjs stopped working, inline :update still works

**URL:** <https://www.ruby-forum.com/t/rjs-from-rjs-stopped-working-inline-update-still-works/107088>\
**Category:** Rails\
**Created:** [June 18, 2007, 1:52am UTC](https://www.ruby-forum.com/t/rjs-from-rjs-stopped-working-inline-update-still-works/107088 "2007-06-18T01:52:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skwp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@skwp](https://www.ruby-forum.com/u/skwp)\
**Post date:** [June 18, 2007, 1:52am UTC](https://www.ruby-forum.com/t/rjs-from-rjs-stopped-working-inline-update-still-works/107088/1 "2007-06-18T01:52:33Z")

</div>

I’ve found this problem reported on several forums but have not seen a  
solution. A couple days ago all my RJS mysteriously stopped working. I  
can see the server return the appropriate code in firebug and when I  
cut & paste the code into firebug console it works just fine. So it  
seems like the browser simply stopped evaling the javascript that is  
returned.

The interesting thing is that using render :update {|page| } inline  
rjs syntax works just fine with exactly the same javascript. I tried  
simplifying it to the basics (using a simple alert) and nothing works.

Has anyone experienced the same issue?

Thanks!  
Yan Pritzker  
[http://planyp.us](http://planyp.us) - the wiki for your social life

---

<div class="post-metadata">

**Author:** ![skwp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@skwp](https://www.ruby-forum.com/u/skwp)\
**Post date:** [June 18, 2007, 1:56am UTC](https://www.ruby-forum.com/t/rjs-from-rjs-stopped-working-inline-update-still-works/107088/2 "2007-06-18T01:56:33Z")

</div>

By the way, the following works:

```
rjs = render_to_string :action => 'my_action'
render :update do |page|
  page<<rjs
end

```

So basically rendering the .rjs file to a string and then manually  
doing an inline rjs update works, but this fails:

render :action =\> ‘my\_action’

where my\_action.rjs does stuff…
