mam taki kod:
<script type="text/javascript">
function GetXmlHttpObject(){
if (window.XMLHttpRequest)
return new XMLHttpRequest();
else if (window.ActiveXObject)
return new ActiveXObject("Microsoft.XMLHTTP");
return null;
}
function stateChanged(type){
alert('cos1');
if(xmlhttp.readyState==4){
alert('cos2');
}
}
function reLoad(go_to, type){
document.getElementById('loading').style.display = 'block';
var url = "<?php echo APP_WEB_PATH; ?>/mw/mw.php?mw=" + go_to;
xmlhttp=GetXmlHttpObject();
xmlhttp.onreadystatechange=stateChanged(type);
xmlhttp.open("GET", url,true);
xmlhttp.send(null);
}
reLoad('1', '1');
</script>
url jest poprawny bo gdy wejde w http://localhost/mw/mw.php?mw=1 zwraca sie to co chce,
ale po odpaleniu tego skryptu wyswietla sie tylko alert 'cos1'
mam napisana tak samo funkcje do dynamicznej rejstracji i dziala a to nie wiem czemu nie dziala ?