title: How to put args in a onreadystatechange function
body: <p>Many people have already answered this question however, in my case it's a little bit tricky.</p>
  <p>I have 4 different place to put returned data from my ajax from 4 different files.</p>
  <p>I am looking for a code like this :</p>
  <pre class="lang-js prettyprint-override"><code>function httpBB(file,id){
      httpRequest.onreadystatechange = loadTicket(id);
      httpRequest.open('POST', 'assets/php/'+file+'.php');
      httpRequest.send();
  }
  </code></pre>
  <p>file represent the file received by ajax and id represent the id of the div in my html.</p>
  <p>Thanks for the help</p>
  <p>Tom</p>