title: using target attribute with form to open the link in same page
body: <p>I am developing a web app. I used form as a drop down menu so that it displays the information about the category users selected. But when I select an option the link is opening in new window. I want it to open in the same window. I used target attribute with form like this </p>
  
  <pre><code>&lt;form id="aform" target="_self"&gt;
  &lt;select id="mymenu"&gt;
  &lt;option selected&gt;Choose a category&lt;/option&gt;
  &lt;option value="moblist.html" target="self"&gt;Mobiles&lt;/option&gt;
  &lt;option value="" &gt;Tablets&lt;/option&gt;
  &lt;option value=""&gt;Laptops&lt;/option&gt;
  &lt;option value=""&gt;Bikes&lt;/option&gt;
  &lt;option value=""&gt;Car&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my java scrip is </p>
  
  <pre><code>var selectmenu=document.getElementById("mymenu")
  selectmenu.onchange=function(){ //run some code when "onchange" event fires
  var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
  if (chosenoption.value!="nothing"){
  window.open(chosenoption.value, "", "") //open target site (based on option's value                attr) in new window
  }
  }
  </code></pre>
  
  <p>but still the link is opening in new window. How can I make the selected page to open in the same window.</p>