title: How to access textfield input from javascript variable in yii
body: <p>I am using java script function in yii _form view in this function i store value in variable and these variable i want to access in yii textfield </p>
  
  <p>so please tell me how access textfield input from javascript variable in yii
  Here is my javascript function i try this but its showing me blank result</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  function get_data(element)
      {
         var te_id = $(element).val();
             document.getElementById('data').value=te_id;
      }
  &lt;/script&gt;
  &lt;?php echo $form-&gt;TextField($model,'data',array('value'=&gt;'')); ?&gt;
  </code></pre>