title: Cannot set property 'value' of undefined in core.js file
body: <p>I understand what this error means i just can't seem to understand why does it happen.</p>
  
  <p>I am using Joomla 1.7 and created a component. Now everything worked and one weird day i recieved this error when trying to submit a form.
  This is what i have :</p>
  
  <pre><code>&lt;form action="index.php" method="post" name="adminForm"&gt;
  ..some elements...
  &lt;input type="hidden" name="option" value="&lt;?php echo $lists['option']; ?&gt;" /&gt;
  &lt;input type="hidden" name="task" value="&lt;?php echo $lists['task']; ?&gt;" /&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>When <code>$lists['task']</code> echos exactly what it suppoused to.
  Now the error is showing inside the core.js joomla file on the submitForm function, which contains :</p>
  
  <pre><code>function submitform(a) {
      if (a) document.adminForm.task.value = a;
      if (typeof document.adminForm.onsubmit == "function") document.adminForm.onsubmit();
      typeof document.adminForm.fireEvent == "function" &amp;&amp; document.adminForm.fireEvent("submit");
      document.adminForm.submit()
  }
  </code></pre>
  
  <p>Sorry the file is compressed, basically it's a very simple function that sets the task element to the given var and submits form.
  (FYI : the <code>a</code> var is the right var and everything is sent perfectly)</p>
  
  <p>Now what i can't seem to understand is how come i get this error when it never happened before and i have created many forms like this inside the component exactly the same and it works fine.</p>