title: AJAX xmlhttp.send parameters
body: <p>I have created an AJAX function that when called it changes the color of a specific button. However, I have only managed to do it in a static way, meaning that I put the values sent to the corresponding php script manually. 
  What I want is to call the function through my html body with some parameters and then these parameters should be passed through the xmlhttp.send method. I tried but it doesn' work.
  For example a call to the below function ajaxFunction() will work OK (it will pass two parameters x=0 and t=1)</p>
  
  <pre><code>    $ function ajaxFunction() { ... xmlhttp.open("POST","example.php",true); 
  xmlhttp.onreadystatechange = handleServerResponse;
  xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  xmlhttp.send("x=0&amp;t=1");}
  </code></pre>
  
  <p>But when I try to call the function with some parameters (ajaxFunction(0,1) then how can I put these values in the xmlhttp.send method?</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks anyway.</p>