title: If jquery DropDown selected value is "y/n" update textfield
body: <p>I want to update a text box when a drop down is either select to Yes or No.  The code I have checks it the is an option for Y or N. How to I check  which value is selected?</p>
  
  <p>html</p>
  
  <pre><code>&lt;select id="SelectionFlag" name="SelectionFlag"&gt;
  &lt;option value=""&gt;Select one&lt;/option&gt;
  &lt;option selected="selected" value="Y"&gt;Yes&lt;/option&gt;
  &lt;option value="N"&gt;No&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>jquery</p>
  
  <pre><code> $("#SelectionFlag").change(function () {
                  var currentYear = (new Date).getFullYear();
                  alert(currentYear + 1);
                  if ($("#SelectionFlag").value = "N") {
  
                      $("#TermDate").val("12/31/" + currentYear);
                  }
                  if($("#SelectionFlag").value = "Y")
                  {
                      $("#EffectiveDate").val("12/31/" + (currentYear + 1));
                  }
              });
  </code></pre>