title: Hide and Show depending on value
body: <p>Does anyone know how to hide and show options under <code>select</code>-tag depending on a certain value from database?</p>
  
  <p>Here's what I did but it doesn't work:</p>
  
  <pre><code>&lt;script&gt;
      var a = &lt;?php echo $row["status"]; ?&gt;
      if(a == 'To be check' || a == 'Endorsed By IT') {
          $("#new").show();
      } else
          $("#new").hide();   
      &lt;/script&gt;
  </code></pre>
  
  <p>Here's what's under <code>#new</code>:</p>
  
  <pre><code>&lt;div id="new"&gt;
      &lt;select name="status"&gt;
          &lt;option value="Request"&gt;Request&lt;/option&gt;
          &lt;option value="Upload"&gt;Upload&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>