title: Counter not live
body: <p>My following script works: but with one problem: it doesnt count down. 
  It gives the right output (time now untill date) but doesnt update automatically. </p>
  
  <p>Anyone nows whats wrong?</p>
  
  <p>The main thing is this countdown timer works with server time (thats why the post, and time.php).</p>
  
  <pre><code>        &lt;script&gt;
  var end = new Date('10/7/2013 7:0 PM');
  
  var _second = 1000;
  var _minute = _second * 60;
  var _hour = _minute * 60;
  var _day = _hour * 24;
  var timer;
  
  var now;
  function startShowRemaining(strnow) {
  now = new Date(strnow);
  showRemaining();
  }
  function showRemaining() {
  //var now = new Date(strnow);
      var distance = end - now;
      if (distance &lt; 0) {
  
          clearInterval(timer);
          document.getElementById('countdown').innerHTML = 'EXPIRED!';
  
          return;
      }
      var days = Math.floor(distance / _day);
      var hours = Math.floor((distance % _day) / _hour);
      var minutes = Math.floor((distance % _hour) / _minute);
      var seconds = Math.floor((distance % _minute) / _second);
  
      document.getElementById('countdown').innerHTML = days + 'days ';
      document.getElementById('countdown').innerHTML += hours + 'hrs ';
      document.getElementById('countdown').innerHTML += minutes + 'mins ';
      document.getElementById('countdown').innerHTML += seconds + 'secs';
  }
  
  timer = setInterval(showRemaining, 1000);
  
  function postRequest(strURL) {
  var xmlHttp;
  if (window.XMLHttpRequest) { // Mozilla, Safari, ...
      var xmlHttp = new XMLHttpRequest();
  } else if (window.ActiveXObject) { // IE
      var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlHttp.open('POST', strURL, true);
  xmlHttp.setRequestHeader('Content-Type', 
     'application/x-www-form-urlencoded');
  xmlHttp.onreadystatechange = function() {
      if (xmlHttp.readyState == 4) {
          startShowRemaining(xmlHttp.responseText);
      }
  }
  xmlHttp.send(strURL); }
  postRequest('time.php');      
  &lt;/script&gt;
  &lt;div id="countdown"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>TIME.PHP:</p>
  
  <pre><code>print date("m/d/Y, G:i:s");
  </code></pre>