title: How do I use javascript to select onchange from a drop down and place it in an innerHTML?
body: <p>This select calls usrTidrapport and gets a list of users from there that it then puts in a dropdownlist or combobox maybe is the right term. </p>
  
  <p>What I'm trying to do is to capture the name from this list in an onchange and put it in an innerHTML. I for some reason can't get the text value of the name, I can only seem to get the value which is "AnvId".</p>
  
  <p>(usrTidrapport is a com+ component so this is VB6 but I think the example is general enough to apply to most languages and it's mainly the javascript that is the problem for me, or so I think.)</p>
  
  <pre><code>&lt;td&gt;
          &lt;span title="visar vem som (utför) arbetsordern och dess uppgifter i ITS."&gt;
              Ansvarig Utförare
              &lt;SELECT id="cboAnsvarigUt" name="cboAnsvarigUt" style="width: 150px;" onfocus="focsel()" onblur="unfocsel()" tabindex="40" onchange="changeHandler()"&gt;
              &lt;OPTION value=-1&gt;&lt;/OPTION&gt;
              &lt;%usrTidrapport.HamtaAnvandareDropdown "", 0, true, AnvId%&gt;
              &lt;%usrTidrapport.HamtaAnvandareDropdown "", 0, false, AnvId%&gt;
          &lt;/SELECT&gt;
          &lt;/span&gt;
  
      &lt;/td&gt;
  </code></pre>
  
  <p>This is where I want to update the innerHTML after a value from the dropdown is selected.</p>
  
  <pre><code>&lt;td&gt;&lt;span name="spnAnsvarigUt" id="spnAnsvarigUt"&gt;&lt;/span&gt;&lt;/td&gt;
  </code></pre>
  
  <p>This is a piece of javascript that actually works, it will pick out the value, whis is AnvId, and put it in the innerHTML for spnAnsvarigUt which is where I want it.
  I however want the text value, not the "value" whis is AnvId.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function changeHandler() {
  
          document.getElementById('spnAnsvarigUt').innerHTML = ThisForm.cboAnsvarigUt.value;
      }
  &lt;/script&gt;
  </code></pre>