title: Dropdown Form & Javascript
body: <p>I've been using the following code for a couple of years successfully... basically, it allows the user to select one of two options from the dropdown and gives them an option to click either button 'A' or 'B' to either download (the link is the same for both options), or view the selection online (two separate links). </p>
  
  <p>I now need to add a third option to the list, but not having much luck?  Here's the original code with the new OPTION 3 added, the javascript I've kept as the original as what I've tried so far is not working.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;form&gt;
    &lt;select class="target"&gt;
     &lt;option value="selected" selected="selected"&gt;Please choose...&lt;/option&gt;
     &lt;option value="option1" value="option3"&gt;OPTION 1&lt;/option&gt;
     &lt;option value="option2" value="option4"&gt;OPTION 2&lt;/option&gt;
     &lt;option value="option5" value="option6"&gt;OPTION 3&lt;/option&gt;
    &lt;/select&gt;  
  &lt;button type="button" class="button" id='button1'&gt;BUTTON 1&lt;/button&gt;
  &lt;button type="button" class="button" id='button2'&gt;BUTTON 2&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
  var onSubmit1 = function()
  {
   window.location = "http://www.link1.com/";
  };
  
  var onSubmit2 = function()
  {
   window.location = "http://www.link2.com/";
  };
  var onSubmit3 = function()
  {
   window.location = "https://www.link1.com/";
  };
  
  var onSubmit4 = function()
  {
   window.location = "https://www.link3.com/";;
  };
  
  $('.target').change(function(e) {    
   var dropdown = $('.target');
   var text = $( ".target option:selected" ).text();    
  
   var $button1= $('#button1');
   $button1.unbind('click');
  
   if(text == "OPTION 1"){
     $button1.click(onSubmit1);
    return;
   }
  
     $button1.click(onSubmit2);      
  });
  
  $('.target').change(function(e) {    
   var dropdown = $('.target');
   var text = $( ".target option:selected" ).text();    
  
   var $button2= $('#button2');
   $button2.unbind('click');
  
   if(text == "OPTION 1"){
     $button2.click(onSubmit3);
    return;
   }
  
     $button2.click(onSubmit4);      
  });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Does anyone have any ideas... is it at all possible with the above code?</p>