title: Node.js Jade: Select Option
body: <p>So... I have my select tag with the department item. Each department item has the attribute Department (IT, physic department etc.) It looks like this:</p>
  
  <pre><code>select size='5'
    each item in departments
      option= item.Department
  </code></pre>
  
  <p>Now I want to make a connection with my app.js -> When the selected Department changed, the app.js must know the change.</p>
  
  <p>I've tried:</p>
  
  <pre><code>select size='5'
    each item in departments
      option: a(href="/printer/#{item.Department}") #{item.Department}
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>I've also tried to make a onchange event.
  Like this:</p>
  
  <pre><code>select size='5' onchange='selectedDepartmentChanged(this.value);'
    each item in departments
      option= item.Department
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>select size='5'
    each item in departments
      option( onchange='selectedDepartmentChanged(this.value);') #{item.Department}
  </code></pre>
  
  <p>and like this:
      select(id="mySelect") size='5' onchange='selectedDepartmentChanged();'
        each item in departments
          option= item.Department</p>
  
  <p>and this:</p>
  
  <pre><code>select size='5'
    each item in departments
      (id="mySelect", onchange='selectedDepartmentChanged();')
  </code></pre>
  
  <p>with the javascript:</p>
  
  <pre><code>script(language='JavaScript1.2').
  function selectedDepartmentChanged()
  {        
      var department = document.getElementById("mySelect").value;  
  }
  </code></pre>
  
  <p>What am I missing here?</p>