title: Javascript how to change cell colour on timing event?
body: <p>I am currently learning JavaScript and I want to get a cell to blink yellow on a time based event, it seems the JavaScript fails every time I get to:</p>
  
  <pre><code>document.all.blinkyellow.bgColor = "yellow";
  </code></pre>
  
  <p>At the moment when my timer reaches 5 it just stops I am guessing it's failing on the above line of code as when I remove it, the timer continues infinitely. </p>
  
  <p>The full JavaScript is below with the relevant html. I would like to know how to properly edit the cell bg colour over time without using a JavaScript library if possible. </p>
  
  <p>This purely so I can learn JavaScript as a whole rather then using a library and not being able to understand the library when I need to make modification or plugin.</p>
  
  <p><strong>Javascript:</strong></p>
  
  <pre><code>var count=0;
  var time;
  var timer_is_on=0;
  setTimeout(doIt, 3000);
  
  function timedCount()
  {
      if(count == 6){    
  
      document.all.blinkyellow.bgColor = "yellow";
  
      }
  document.getElementById('txt').value=count;
  
  count=count+1;
  time=setTimeout("timedCount()",1000);
  
  }
  
  function doTimer()
  {
  if (!timer_is_on)
    {
    timer_is_on=1;
    timedCount();
    }
  
  }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;table&gt; 
   &lt;tbody&gt; 
    &lt;tr&gt; 
     &lt;td&gt;Col 1&lt;/td&gt; 
     &lt;td&gt;Col 2&lt;/td&gt; 
     &lt;td&gt;Col 3&lt;/td&gt;
     &lt;td&gt;Col 3&lt;/td&gt;
    &lt;/tr&gt; 
    &lt;tr&gt; 
     &lt;td class="blinkyellow"&gt;Col 1&lt;/td&gt; 
     &lt;td&gt;Col 2&lt;/td&gt; 
     &lt;td&gt;Col 3&lt;/td&gt;
     &lt;td&gt;Col 3&lt;/td&gt;   
    &lt;/tr&gt; 
    &lt;tr&gt; 
     &lt;td&gt;Col 1&lt;/td&gt; 
     &lt;td&gt;Col 2&lt;/td&gt; 
     &lt;td&gt;Col 3&lt;/td&gt;
     &lt;td&gt;Col 3&lt;/td&gt;   
    &lt;/tr&gt;
    &lt;tr&gt; 
     &lt;td&gt;Col 1&lt;/td&gt; 
     &lt;td&gt;Col 2&lt;/td&gt; 
     &lt;td&gt;Col 3&lt;/td&gt;
     &lt;td&gt;Col 3&lt;/td&gt;
    &lt;/tr&gt; 
   &lt;/tbody&gt; 
  &lt;/table&gt; 
  </code></pre>