title: Error in getting a desired ouput of Dropdown box using javascript
body: <p>what im trying to do to my code is to disable the 'Senior Highschool Track' dropdown button whenever i choose the "Junior Highschool" from the 'Education Level' dropdown button options</p>
  
  <p>And when i choose the "Senior Highschool" from the 'Education Level' dropdown options it will enable the 'Senior Highschool Track' dropdown button and reset the value back to "SELECT TRACK",</p>
  
  <p>"Education Level Dropdown HTML"</p>
  
  <pre><code>&lt;td&gt;
  &lt;select name="educlevel" class="StyleTextField" editable="true" edittext="" id="educlevel" onChange="disableDropdown()"&gt;
                              &lt;option class="separator" disabled="disabled" selected&gt;SELECT EDUCATION LEVEL&lt;/option&gt;
                              &lt;option value="JuniorHighschool" &lt;?php echo  set_select('educlevel', 'Junior Highschool'); ?&gt; &gt;Junior Highschool&lt;/option&gt;
                              &lt;option value="SeniorHighschool" &lt;?php echo  set_select('educlevel', 'Senior Highschool'); ?&gt; &gt;Senior Highschool&lt;/option&gt;
                              &lt;option value="College" &lt;?php echo  set_select('educlevel', 'College'); ?&gt; &gt;College&lt;/option&gt;
                              &lt;option value="Graduate" &lt;?php echo  set_select('educlevel', 'Graduate Program'); ?&gt; &gt;Graduate Program (Master)&lt;/option&gt;
                          &lt;/select&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>"Senior Highschool Track Dropdown HTML"</p>
  
  <pre><code> &lt;td&gt;&lt;select name="seniorhstrack" class="StyleTextField" editable="true" edittext="" id="seniorhstrack" onChange="disableDropdown()"&gt;
                      &lt;option class="separator" disabled="disabled" selected&gt;SELECT TRACK&lt;/option&gt;
                      &lt;option id="seniorNA" value="NA" &lt;?php echo  set_select('course', 'NA'); ?&gt; &gt;Not Applicable&lt;/option&gt;
                      &lt;option value="ABM" &lt;?php echo  set_select('course', 'ABM'); ?&gt; &gt;Accountancy, Business and Management Strand&lt;/option&gt;
                      &lt;option value="HUMSS" &lt;?php echo  set_select('course', 'HUMSS'); ?&gt; &gt;Humanities and Social Sciences Strand&lt;/option&gt;
                      &lt;option value="STEM" &lt;?php echo  set_select('course', 'STEM'); ?&gt; &gt;Science, Technology, Engineering and Mathematics Strand&lt;/option&gt;
                      &lt;option value="TVL" &lt;?php echo  set_select('course', 'TVL'); ?&gt; &gt;Technical Vocational Livelihood Strand&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/td&gt;
  </code></pre>
  
  <p>"Javacript that I made"</p>
  
  <pre><code>function disableDropdown()
  {
      if (document.getElementById("educlevel").value === "JuniorHighschool") {
          document.getElementById("course").disabled=true;
          document.getElementById("seniorhstrack").disabled=true;
          document.getElementById("seniorNA").selected=true;
          document.getElementById("courseNA").selected=true;
          document.getElementById("seniorNA").style.display = 'block';
      }
      else if (document.getElementById("educlevel").value === "SeniorHighschool") {
          document.getElementById("course").disabled=true;
          document.getElementById("seniorhstrack").disabled=false;
          document.getElementById("courseNA").selected=true;
          document.getElementById("seniorNA").style.display = 'none';
      }
      else if ((document.getElementById("educlevel").value === "College") || (document.getElementById("educlevel").value === "Graduate")){
          document.getElementById("seniorhstrack").disabled=true;
          document.getElementById("course").disabled=false;
          document.getElementById("courseNA").style.display = 'none';
          document.getElementById("seniorNA").selected=true;
      }
      else {
          document.getElementById("course").disabled=false;
          document.getElementById("seniorhstrack").disabled=false;
      }
  }
  </code></pre>
  
  <p>I already tried putting this code </p>
  
  <pre><code>document.getElementById("seniorhstrack").selectedIndex = 0;
  </code></pre>
  
  <p>However, the issues that im getting is that it wont let me choose the other options, it just stays at the selected index which is "SELECT TRACK".</p>
  
  <p>Im still learning javascript and any suggestions will be greatly appreciated, thanks.</p>