title: Javascript: ReferenceError
body: <p>I'm trying to call a function with onchange() in an input form</p>
  
  <p>When I check the console in Chrome, the code below returns:</p>
  
  <pre><code>ReferenceError: changingNow is not defined
  </code></pre>
  
  <p>In safari, it says</p>
  
  <pre><code>  ReferenceError: Can't find variable changingNow
  </code></pre>
  
  <p>Here's the code:</p>
  
  <pre><code>function changingNow() {
   first_name=document.getElementById(first_name);
   last_name=document.getElementById(last_name);
   username=document.getElementById(username);
   category=document.getElementById(category);
   if ((first_name!=="")&amp;&amp;(last_name!=="")&amp;&amp;(username!=="")&amp;&amp;(category!="empty")) {
     form1.process.disabled = false;
   }
   else {
    form1.process.disabled = true;
   }
  
   document.getElementById('tweet').value = 'I just voted for '+first_name+' '+last_name+'('+username+')'+'in the '+category+' category!';
   }
  
  
   First Name&lt;input type="text" name="first_name" id="first_name" class="first_name" maxlength="50" onchange="changingNow"/&gt;&lt;br/&gt;
  </code></pre>
  
  <p>Googling this seems to indicate that jQuery is responsible, but there's no jQuery on the page.</p>
  
  <p>Thanks</p>
  
  <p>EDIT</p>
  
  <p>Rob W is correct, I've already tried brackets, they're irrelevent in sorting this problem. thanks anyway!</p>