title: How to deal with <%= text_field %> in ruby on rails when javascript is used
body: <p><strong>I used the JavaScript as:</strong></p>
  
  <p>script language="javascript"</p>
  
  <p>function writeResult(text){
      document.myform.tDescription.value = text;</p>
  
  <p>}</p>
  
  <p>/script</p>
  
  <p><strong>hence my text field will be:</strong></p>
  
  <p>form="myform"
   &lt;%= s.text_field 'xyz','abc',  :name =>('tDescription'), :size =>50 %>
  /form</p>
  
  <p>I have to store this text value in the table 'xyz' in column 'abc' but its not working. As ruby on rails by default take the text field name as <strong>name="xyz[abc]"</strong> , if i m not specifing any name for the text field but becoz of java script the function call I have specify the name as <strong>tDescription</strong>.
  Please help how I can store this value in database.
  If i use <strong>input tag</strong> instead. What will the controller corresponding code.</p>