RJS - unterminated string literal

What about

page['comment'+@id].visual_effect :blind_up

I realise now, my code should not of worked (unless @id is already a string) so it should be @id.to_s... But this this not the issue because your code shows the "comment-9"

Do you have javascript_include_tag :defaults ?

Here is my test (which works), otherwise use firefox and firebug to debug

Hope this helps

index.rhtml <html>   <head>     <%=javascript_include_tag :defaults %>   </head> <body>   <div id="comment-1" style="background-color: red">     a<br>   </div>   <%=link_to_remote "press me", :url=>{:action=>:hide_me} %> </body> </html>

hide_me.rjs @id=1 page['comment-'+@id.to_s].visual_effect :blind_up

Did you try using <%= -%> instead of <%= %> ? (the dash-percent- greaterthan is supposed to not spit out an additional #\linefeed).