title: Why is my javascript code not activating the function?
body: <pre><code>&lt;script&gt;
  function doWork(search) {
  alert(search);
  if (search=="blue") {window.open("db-loader.php", "_blank",
    "location=yes,height=570,width=575,scrollbars=yes,status=yes")};
  if (search=="list") {form.submit()};
  }
  &lt;/script&gt;
  
  
  &lt;form action="retspro-find.php" method="GET"&gt;
    &lt;select name="search" id="search" onchange="doWork(search)"&gt;
    &lt;option value="access"&gt;Access&lt;/option&gt;
    &lt;option value="yellow"&gt;Yellow&lt;/option&gt;
    &lt;option value="blue"&gt;Blue&lt;/option&gt;
    &lt;option value="list"&gt;List&lt;/option&gt;
    &lt;option value="demo"&gt;Demo&lt;/option&gt;
    &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am not seeing any thing in at the alert in the function.. when i remove the word search from both locations it will then light off the alert but does not activate any routine.... Just trying to get the word search to pick up the selected choice and send it to the function like for example blue when clicked on should put blue in search and go to the function and activate the popup window... 
  Thanks</p>