Why isn't my JavaScript countdown function doing anything?
<p>I found this script:</p>

<pre><code>&lt;script language="Javascript" TYPE="text/javascript"&gt;
var container = document.getElementById('dl');
var seconds = 10;
var timer;
function countdown() {
    seconds--;
    if(seconds &gt; 0) {
       container.innerHTML = 'Please wait &lt;b&gt;'+seconds+'&lt;/b&gt; seconds..';
    } else {
       container.innerHTML = '&lt;a href="download.php"&gt;Download&lt;/a&gt;';
       clearInterval(timer);
  }
}
timer = setInterval(countdown, 1000);
&lt;/script&gt;
</code></pre>

<p>and I'm trying to call it with:</p>

<pre><code>&lt;input type="button" onclick="countdown()" id="dl" value="Download" /&gt;
</code></pre>

<p>but nothing happens. What am I doing wrong? I have JavasScript enabled but nothing happens after I click the button.</p>
