title: Using js.rjs to render inline content
body: <p>I am trying to improve my knowledge of Rails.  I was trying to use js.rjs in a simple code.
  Here's the view: </p>
  
  <pre><code>&lt;div style="background: #000080; font-weight: bold; margin-left: 30px"&gt;&lt;p&gt;This should     Remain Same&lt;/p&gt;&lt;/div&gt;
      &lt;div id="noid"&gt;
  
  
      &lt;%=link_to 'Click',:action=&gt;:say_when , :remote =&gt; true %&gt;  
  
        and I will look it up.
      &lt;/div&gt;
  </code></pre>
  
  <p>And here's the controller: </p>
  
  <pre><code>class DemoController &lt; ApplicationController
  
      def say_when
  
        respond_to do |format|
          format.js
        end    
  
      end
  
  end
  </code></pre>
  
  <p>And I have views/Say_when.js.rjs as follows: </p>
  
  <pre><code>page.replace_html('noid', render(:text=&gt;"OK"))
  </code></pre>
  
  <p>But when the "click" link is clicked, nothing happens. What am I doing wrong?</p>