title: :onchange in form not working, in rails 3.1 app
body: <p>This is exactly my problem. In my case the :onchange function is not working, though I have added the jquery in the application.rb.</p>
  
  <p>in the form, I need to alert the users</p>
  
  <pre><code>&lt;%= telephone_field(:user, :phone_country_code, :size =&gt; 1, :onchange =&gt; "if $('user[phone_country_code]').length &gt; 2 { alert('Your firstname needs to be shorter!'); }") %&gt;
  </code></pre>
  
  <p>in application.html.rb</p>
  
  <pre><code>&lt;%= javascript_include_tag "jquery" %&gt;
  </code></pre>
  
  <p>in the console I am getting</p>
  
  <pre><code>Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2011-09-27 12:36:39 +0530
  Served asset /application.js - 304 Not Modified (1ms)
  </code></pre>