title: submit_tag with javascript function
body: <p>I am new to rails.I want to call a javascript function when click the submit button.I used submit_tag , but the function did not get triggered.I want some thing like the following ,</p>
  
  <pre><code>     &lt;%= submit_tag , :onsubmit =&gt; "return validateform()" %&gt;
  </code></pre>
  
     <p>I googled the problem but I couldn't find a solution.Please any one give a solution.</p>