Multiple functions with jQuery

Multiple functions with jQuery

Seems that only one works at a time, each one when called (button press on page) individually (blank out all other functions) works and if I leave them unblanked only the last function works..

How can I get them all to display their data instead of just one of them?


Each function is like this, draws data from a MySQL database:






  1. function loadFuntion_x() {
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
                {
                document.getElementById("function_x").innerHTML=xmlhttp.responseText;
                }
      }
    xmlhttp.open("GET","/scripts/x.php",true);
    xmlhttp.send();
    }

















jQuery code that is meant to call all functions:

  1. $(document).ready(function(){
    $('#function_all').click(function() {
    loadFunction_1();
    loadFunction_2();
    loadFunction_3();
    loadFunction_4();
    loadFunction_5();
    loadFunction_6();
    loadFunction_7();
    loadFunction_8();
    });
    });











Any help would be greatly appreciated,

Thanks,

otester