title: function is looped according to setinterval but with different parameters
body: <p>i have a simple question, there is a function with parameter emp_id that opens up a form for a chat with different attributes, i want it to be refreshed automatically each 10 sec, now it works a bit wrongly, since there is a parameter emp_id that is can be changed, and once i change it, the chat with messages and form are refreshed double time or triple times :) depend on how many times u change the emp_id, i hope i was clear )) anyway here is the javascript function:</p>
  
  <pre><code>function load_chat(emp_id) {
          var url = "#request.self#?fuseaction=objects2.popup_list_chatform"
          url = url + "&amp;employee_id=" + emp_id;
          document.getElementById('form_div').style.display = 'block';                            AjaxPageLoad(url,'form_div',1,'Yükleniyor');
          setInterval( function() { 
              load_chat(emp_id); 
          },10000);
  }
  </code></pre>
  
  <p>there a list of names, once i click on one of them, this form is opened by this function, but if i click another user, i mean if i change the emp_id, it refreshes, the previous and present form. how do i change it so that it will refresh only the last emp_id, but not all of id's which i've changed</p>
  
  <p>thank you all for the help, i really appreciate it!</p>