title: How to get a value from a combobox in javascript
body: <p>I have this function and I want to make the <code>var</code> category to have the value of the combobox that has the id <code>#ticket_category_clone</code></p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>   function check () {
        var category="#ticket_category_clone";
            if (category=="Hardware")
        {
        SPICEWORKS.utils.addStyle('#ticket_c_hardware_clone{display: none !important;}');
        }
      }
  
      SPICEWORKS.app.helpdesk.ready(check);​
  </code></pre>
  
  <p>edit</p>
  
  <p>It only alerts if I make the code this way:</p>
  
  <pre><code>function check () {
      // var category = document.getElementById('#ticket_c_hardware_clone').value;
     var category ="Hardware";
     alert(category)
            if (category=="Hardware")
        {
          SPICEWORKS.utils.addStyle('#ticket_c_hardware_clone{display: none !important;}');
  
  
        }
     alert(category)
      }
  
  SPICEWORKS.app.helpdesk.ready(check);
  </code></pre>
  
  <p>​</p>
  
  <p>like this? <a href="http://img12.imageshack.us/img12/8438/semttuloluu.png" rel="nofollow">http://img12.imageshack.us/img12/8438/semttuloluu.png</a></p>
  
  <p>and the code:</p>
  
  <pre><code>&lt;select id="ticket_category_clone" name="ticket[category]" hdpp="ticket_category"&gt;&lt;option value=""&gt;&lt;/option&gt;
  </code></pre>