title: Javascript error in Chrome and Mozilla but not Opera. Name not defined
body: <p>So I have recently started programming pages... Little thins and I was trying something in a page that I had done previously so I just copied the code and changed the values. I was wondering if anyone can shade some light why it worked fine in my Opera browser but not on my Chrome or Firefox (I was using wamp for my computer act as a localwebserver)</p>
  
  <p>What I did was using a  element and the change of it's value (the user selecting a date) to call a function that went to use ajax and call a database and return stuff, I don't think the details are needed)</p>
  
  <p>So I had the following</p>
  
  <pre><code>&lt;select name="daySelector" id="daySelectorId" onchange="changeDate(daySelector.value)"&gt;
      &lt;option value="-1"&gt;Day&lt;/option&gt;
      &lt;option value="2012-01-30"&gt;2012-01-30&lt;/option&gt;
      &lt;option value="2012-01-31"&gt;2012-01-31&lt;/option&gt;
      &lt;option value="2012-02-01"&gt;2012-02-01&lt;/option&gt;
      &lt;option value="2012-02-02"&gt;2012-02-02&lt;/option&gt;
      &lt;option value="2012-02-03"&gt;2012-02-03&lt;/option&gt;
      &lt;option value="2012-02-04"&gt;2012-02-04&lt;/option&gt;
      &lt;option value="2012-02-05"&gt;2012-02-05&lt;/option&gt;
      &lt;option value="2012-02-06"&gt;2012-02-06&lt;/option&gt;
      &lt;option value="2012-02-07"&gt;2012-02-07&lt;/option&gt;
      &lt;option value="2012-02-08"&gt;2012-02-08&lt;/option&gt;
      &lt;option value="2012-02-09"&gt;2012-02-09&lt;/option&gt;
      &lt;option value="2012-02-10"&gt;2012-02-10&lt;/option&gt;
      &lt;option value="2012-02-11"&gt;2012-02-11&lt;/option&gt;
      &lt;option value="2012-02-12"&gt;2012-02-12&lt;/option&gt;
      &lt;option value="2012-02-13"&gt;2012-02-13&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Opera worked just fine and returned what I wanted...
  But Chrome and Firefox for some reason say that daySelector is not defined... When I use the 'this' reference all browsers work just fine. The funny thing is that the project I took the code from was something I did before I update my pc which had only firefox installed (an older version that is) and I am pretty sure it didn't cause any problems...</p>
  
  <p>So any ideas. I realize this is not a problem per se but I am curious about details like this and I wanted to know... BTW, to those that have programmed in html/ajax/js/... for more than a few months... Should I just pass the whole element and take what I need inside the function?</p>