title: Copy selected option value to another text box but just for some options
body: <p>HTML excerpt    </p>
  
  <pre><code>Selection:
  &lt;select name="no_exam" id="no_exam"&gt;
      &lt;option value="" selected="selected"&gt;===select option===&lt;/option&gt;
      &lt;option value="A+"&gt;100-75&lt;/option&gt;
      &lt;option value="B+"&gt;50-74&lt;/option&gt;
      &lt;option value="C+"&gt;0-49&lt;/option&gt;
      &lt;option value="AB"&gt;AB&lt;/option&gt;
      &lt;option value="NE"&gt;NE&lt;/option&gt;
      &lt;option value="MC"&gt;MC&lt;/option&gt;
  &lt;/select&gt;
  &lt;/br&gt;
  
  Selected value:
  &lt;input type="text" name="std_marks" id="std_marks"/&gt;
  </code></pre>
  
  <p>Javascript that is relevant to upper HTML</p>
  
  <pre><code>$("#no_exam").change(function() {
      var textval = $(":selected",this).val();
      $('input[name=std_marks]').val(textval);
  
      // if value is selected, text field is readonly
      result_form.std_marks.disabled=(!textval) ? false : true;
  });
  </code></pre>
  
  <p>This code works ok... But I want to change it. My problem is that selection group has two categories... one is marks &amp; other is absent..</p>
  
  <pre><code>--------------------------------------------------
  * Marks category: 100-75,50-74,0-49
  -----------------------------------------------------
  * Absent category: AB,NE,MC
  ------------------------------------------------------
  </code></pre>
  
  <p>Here when I select an option its value gets copied to the input box.</p>
  
  <p>How can I change this code to copy selected option's value when user selects one of the Absent category options but don't do anything when they select a Marks option?</p>
  
  <p>Demo Link:- <a href="http://jsfiddle.net/dontspeak/2zfdq/4" rel="nofollow">Demo Link</a></p>