title: document.getElementById('id').value failing in ASP.net javascript function
body: <p>Hidden fields:</p>
  
  <pre><code>&lt;input type="hidden" id="hidOrg1"  runat="server" value="" /&gt;
  &lt;input type="hidden" id="hidBT" runat="server" value="" /&gt;
  </code></pre>
  
  <p>javascript function:</p>
  
  <pre><code>function doGetWave(obj) {
      //debugger
      var brk = document.getElementById('hidBT').value;
      //var brkId = document.getElementById('hidBI').value;
      var org = document.getElementById('hidOrg1').value;
      session = obj.options[obj.selectedIndex].value;
      sWaveText = obj.options[obj.selectedIndex].text;    
      if (brk == "") {
          window.location.href = "url.aspx?multiple=" + org + "&amp;wave=" + sWaveText + "&amp;strORGId=multiple";
      }
      else {
          window.location.href = "url.aspx?multiple=" + org + "&amp;wave=" + sWaveText + "&amp;BRKType=" + brk + "&amp;strORGId=multiple";
      }
  }
  </code></pre>
  
  <p>codebehind:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      hidOrg1.Value = strOrgId;
      hidBT.Value = "";
  }
  </code></pre>
  
  <p>The javascript function errors out with "Object Expected" at the var brk = ... and I cannot figure out where it is going wrong.  Pulling my hair out!  :(</p>