title: Text area that varies depending on the selected item in the dropdown menu
body: <p><strong>Solved ... you can close ...</strong></p>
  
  <p>I have a drop-down menu and a text-area in which I enter a written differently, depending on the item that is selected in the drop-down menu (dynamicly).</p>
  
  <p>My html-php code is this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="jquery-2.0.3.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#copyright_titles').change(function () {                
                  var isFirstSelected = $("#copyright_titles option:first-child" ).is(':selected');
                  var isLastSelected = $("#copyright_titles option:last-child" ).is(':selected');
  
                  if (isFirstSelected) {
                       $('#copyright_text').hide();
                       return;
                  }
  
                  $('#copyright_text').attr("readonly",isLastSelected?false:true);
  
  
                  $.ajax({ type: "GET", url: "copyrights.xml", dataType: "xml", success: function(xml) {
  
                      $(xml).find('copyright').each(function() {
  
                        var copyright_title_selected = $("#copyright_titles option:selected").text();
                        var title = $(this).find('title').text();
                        var text = $(this).find('text').text();
  
                        if (title === copyright_title_selected) {
                            $('#copyright_text').text(text);
                        }
  
                      });
                    },
                    error: function(request, error, tipo_errore) { alert(error+': '+ tipo_errore); }
                  });
  
  
                  $('#copyright_text').show();
              });
          });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;form name="test" action="test.php" method="post"&gt;
          &lt;table&gt;
              &lt;tr&gt;
                      &lt;td&gt;Copyright:&lt;/td&gt;
                      &lt;td&gt;
                          &lt;select id='copyright_titles'&gt;
                              &lt;?php
                                  $xml = simplexml_load_file('copyrights.xml');
                                  $i = 0;
                                  foreach($xml-&gt;copyright as $copyright)
                                  {
                                      $i++;
                                      echo '&lt;option value="copyright'.$i.'"&gt;'.$copyright-&gt;title.'&lt;/option&gt;';
                                  }
                              ?&gt;
                          &lt;/select&gt;
                      &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;&lt;td&gt;
                          &lt;textarea id='copyright_text' rows="6" cols="65" style="display:none"&gt;&lt;/textarea&gt;
                      &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>The texts are taken from this xml file:</p>
  
  <pre><code>&lt;copyrights&gt;
  &lt;copyright&gt;
      &lt;title&gt;free&lt;/title&gt;
      &lt;text&gt;&lt;/text&gt;
  &lt;/copyright&gt;
  &lt;copyright&gt;
      &lt;title&gt;copyright1&lt;/title&gt;
      &lt;text&gt;text1&lt;/text&gt;
  &lt;/copyright&gt;
  &lt;copyright&gt;
      &lt;title&gt;copyright2&lt;/title&gt;
      &lt;text&gt;text2&lt;/text&gt;
  &lt;/copyright&gt;
  &lt;copyright&gt;
      &lt;title&gt;copyright3&lt;/title&gt;
      &lt;text&gt;text3&lt;/text&gt;
  &lt;/copyright&gt;
  &lt;copyright&gt;
      &lt;title&gt;other&lt;/title&gt;
      &lt;text&gt;&lt;/text&gt;
  &lt;/copyright&gt;
  </code></pre>
  
  <p></p>