title: ajax show 2 data request with onclick
body: <p>hello i am still new on ajax i wanted show 2 data in different place. </p>
  
  <p>here the code</p>
  
  <pre><code> &lt;li onclick="showPost(this.value);" value="*digit*" &gt;lala&lt;/li&gt;
  </code></pre>
  
  <p>the javascript</p>
  
  <pre><code>&lt;script&gt;
  if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
              xmlhttp=new XMLHttpRequest();
          }
          else
          {// code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
  
          function showPost(hal)
          {
              xmlhttp.onreadystatechange=function()
              {
                  if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
                  {
                      document.getElementById("gallekanan").innerHTML=xmlhttp.responseText;  
                  }
              }       
              xmlhttp.open("GET","../wp-content/themes/koolfort/example.php?pal="+hal,true);
              xmlhttp.send();
              showJudul(hal);
          }
  
          function showJudul(hal)
          {
              xmlhttp.onreadystatechange=function()
              {
                  if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
                  {
                      document.getElementById("eventjudul").innerHTML=xmlhttp.responseText;  
                  }
              }       
              xmlhttp.open("GET","../wp-content/themes/koolfort/example1.php?pal="+hal,true);
              xmlhttp.send();
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>when i running the code just the showJudul running and the showPost is Aborted.</p>