title: How to insert drop-down value into textArea?
body: <p>Does anyone know how can I insert values from the drop-down list into textarea, when it is being selected? I went searching around the internet and I tried doing it, yet it does not appear at all.</p>
  
  <p>Below is the code snippets of what I have done but I'm stuck where I selected the value from drop-down list, it doesn't appear in my textarea at all. I need help. </p>
  
  <p>Thanks people.</p>
  
  <p>Variable.php</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  $variable_arr = array("Mobile", "Name", "Amount", "Due", "Etc");
  $variable_str = '&lt;select name="Variable" id="drp_dwn"&gt;';            
  $variable_str .= '&lt;option selected&gt;&amp;ltSelect Data&amp;gt&lt;/option&gt;';
  
  foreach($variable_arr as $variable)
  {
      $variable_str .= '&lt;option value="'. $variable .'"&gt;&amp;lt'.$variable.'&amp;gt&lt;/option&gt;';
  }
  
  $variable_str .= '&lt;/select&gt;';
  
  ?&gt;
  </code></pre>
  
  <p>change.js</p>
  
  <pre><code>$(document).ready(function() {
      $("#drp_dwn").change(function () {
          var str = "";
  
          $("selected").each(function () {
              str += $(this).text() + " ";
              });
          $("textArea").text(str);
          }).change();
  });
  </code></pre>
  
  <p>index.php</p>
  
  <pre><code>&lt;textarea rows="4" cols="40" type="text" name="content" id="textArea"&gt;&lt;/textarea&gt;
  &lt;label&gt; &lt;input type="submit" value="Send" name="submit" id="send_box"&gt; &lt;/label&gt;
  </code></pre>