Hello,

I'm wondering why this Ajax call isn't refreshing his data from de MYSQL database

I have a form, in this form I have a HighSlide button with calls another popup with a form to add something to the other form.

Code:
<script type="text/javascript">
hs.Expander.prototype.onAfterClose = function MakeRequest_onderdelen() {
}
</script>
The code for the AJAX call is:

Code:
<script id="source" language="javascript" type="text/javascript"> 
function getXMLHttp() {
  var xmlHttp
  try { //Firefox, Opera 8.0+, Safari
    xmlHttp = new XMLHttpRequest();
  } catch(e) { //Internet Explorer
    try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
      try {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch(e) {
        alert("Your browser does not support AJAX!")
        return false;
      }
    }
  }
  return xmlHttp;
}

function MakeRequest_onderdelen() {
  var xmlHttp = getXMLHttp();
  xmlHttp.onreadystatechange = function() {
    if(xmlHttp.readyState == 4) {
      HandleResponse(xmlHttp.responseText);
    }
  }
  xmlHttp.open("GET", "toernooi-onderdelen-ajax.php", true);
  xmlHttp.send(null);
}

function HandleResponse(response) {
  document.getElementById('output_onderdelen').innerHTML = response;
}
</script>
In the body of the php I have this DIV :
PHP Code:
<div id="output_onderdelen"></div
When I open this page it shows all the records that are in the database. When I click on the Highslide button to add another record and close this Highslide it don't refresh the div.

When I refresh the page, the added record is visible so this is working :

Code:
<script type="text/javascript">
$(document).ready(function() {
	MakeRequest_onderdelen();
});
</script>
Anyone any idea why this isn't working:

Code:
<script type="text/javascript">
hs.Expander.prototype.onAfterClose = function MakeRequest_onderdelen() {
}
</script>
The function MakeRequest_onderdelen() is working when the page loads but not when the Highslide is closed.

Any ideas ???

Kind regards,

Arie