title: Uncaught TypeError: Cannot set property 'onchange' of null
body: <p>I am using a drop down for dynamically changing content on a page. It works but is throwing a js error in Chrome ONLY. What Chrome recommends I don't know how to implement. Site is built in ExpressionEngine 2.8.1.</p>
  
  <p><strong>ERROR MESSAGE IN CHROME</strong></p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot set property 'onchange' of null functions.js:65<br>
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead.</p>
  </blockquote>
  
  <p><strong>MY JS Code</strong></p>
  
  <pre><code>document.getElementById("drop").onchange = function() {
      if (this.selectedIndex!==0) {
          window.location.href = this.value;
      }        
  };
  </code></pre>
  
  <p><strong>MY HTML Code</strong></p>
  
  <pre><code>            &lt;form method="post" action="{path='locations/index'}" class="drop"&gt;
                  &lt;select id="drop"&gt;
                      &lt;option&gt;Select a Location:&lt;/option&gt;
                  {exp:channel:entries channel="locations" category="not 3" orderby="title" sort="asc" dynamic="no"}
                      &lt;option value="{site_url}index.php/locations/{url_title}"&gt;{title}&lt;/option&gt;
                  {/exp:channel:entries}
                  &lt;/select&gt;
              &lt;/form&gt;
  </code></pre>