title: setInterval javascript calls do not go away after ajax load
body: <p>I'm using MVC with some partial rendering and ajax calls.  In one of my result tables I have a field that is a timer.</p>
  
  <p>The following code is on my partial view that is rendered every 30 seconds.  One of the fields is an active timer that displays to the user:</p>
  
  <pre><code>&lt;td&gt;&lt;div id="@someID" class="nobutton"&gt;&lt;/div&gt;&lt;script&gt;setInterval(function () { startTimer('@startDateTime', '@someID') }, 500);&lt;/script&gt;&lt;/td&gt;
  </code></pre>
  
  <p><strong>This works great but after the ajax call is made to refresh the partial, the interval function is still calling the old IDs (someID) that are no longer there.</strong></p>
  
  <p>Here is the javascript for the timer:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function startTime(dt, field){
          var field = document.getElementById(field);
          if (field == null)
              return;
  
          var rowTime = new Date(dt);
          var rowTimems = rowTime.getTime(rowTime);
  
          var currentTime = new Date();
          var currentTimems = currentTime.getTime(currentTime);
  
          var difference = currentTimems - rowTimems;
  
          var hours = Math.floor(difference / 36e5),
              minutes = Math.floor(difference % 36e5 / 60000),
              seconds = Math.floor(difference % 60000 / 1000);
  
          field.innerHTML = formatTime(hours) + ":" + formatTime(minutes) + ":" + formatTime(seconds);
  &lt;/script&gt;
  </code></pre>
  
  <p>And the call on the main page that refreshes the partial is pretty simple:</p>
  
  <pre><code>var t = setInterval(function () {
              $.ajax({
                  url: "MYURL",
                  type: "GET",
                  cache: false,
                  success: function (data) {
                      $("#summary").html(data);                    
                  }
              });
          }, 30000);
  </code></pre>
  
  <p><strong>Is there a way to kill the old timers?  Why are they still running?</strong></p>