title: how to get the id of each dropdown and textarea row
body: <p>Not sure what is the right approach to tackle this</p>
  
  <p>I want to control te textarea Reason based on what is selected in the dropdown list. As you can see below i have got to the stage where i can get the attribute id of each row of the DropDown list Status But i can't get the attr id of each textarea Reason</p>
  
  <p>My final result should be if a user selects declined then the user but enter a reason and if deactivated must enter a date. Thanks in advance</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td class="ms-vb"&gt;&lt;span dir="none"&gt;
  &lt;select class="ms-RadioText" title="Status" id="WebPartManager_g_31f0d9e1_72a0_4ef2_b286_7c30cd0fda1f_ff5_3_ctl00_DropDownChoice" name="WebPartManager$g_31f0d9e1_72a0_4ef2_b286_7c30cd0fda1f$ff5_3$ctl00$DropDownChoice"&gt;
  &lt;option value="Provisionally Approved" selected="selected"&gt;Provisionally Approved
  &lt;/option&gt;
  &lt;option value="Approved"&gt;Approved&lt;/option&gt;
  &lt;option value="Declined"&gt;Declined&lt;/option&gt;
  &lt;option value="Deactivated"&gt;Deactivated&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;
  &lt;/span&gt;&lt;/td&gt;
  &lt;td class="ms-vb"&gt;
  &lt;span dir="none"&gt;
  &lt;textarea dir="none" class="ms-long" title="Reason" id="WebPartManager_g_31f0d9e1_72a0_4ef2_b286_7c30cd0fda1f_ff11_3_ctl00_ctl00_TextField" cols="20" rows="6" name="WebPartManager$g_31f0d9e1_72a0_4ef2_b286_7c30cd0fda1f$ff11_3$ctl00$ctl00$TextField" style="display: none;"&gt;Test3&lt;/textarea&gt;&lt;br&gt;
  &lt;/span&gt;&lt;/td&gt;
  
  &lt;/tr&gt;
  $(document).ready(function(){
  
   $("textarea").hide(); 
   $("input[title$='DeActivatedDate']").hide(); 
  
  
   $("tr select[title='Status']").change(function () {
  
  
  
  
          var selectedValue = $(this).find("option:selected").text();
  
  
          if (selectedValue == 'Declined')
          {
  
  
         alert('You need to type in a Reason if STATUS is DECLINED!');
  
  
          //i'm getting the id of each dropdown row here
          var select_id = $(this).attr('id');  
          var b = $("#" + select_id).text();
          alert(select_id);
          //i can get the id of each Dropdown  of each row
  
  
           //i'm getting the id of each textarea row here
          var textarea_id = $("tr td textarea").attr('id'); 
          var c = $("#" + textarea_id).text();
          alert(textarea_id);
  
          //i'm only getting the attr id of the first textarea but not the other
  
  
  
         }
  
          if (selectedValue == 'Deactivated')
          {
  
          alert('You need to select a De-Activated Date if STATUS IS DEACTIVATED!');
         }
  
  
  
  
        });
  });
  </code></pre>