N
Netzwerkidi
Hallo in die Runde,
ich habe mir heute noch einmal die neue WAMP-Serverumgebung auf dem Notebook installiert, nachdem die alte nicht mehr lief.
Und das klappt auch alles wunderbar, Aliases eingrichtet, Zugriffe funktionieren, test-Pfad, localhost...
Nur Ajax klappt leider gar nicht. Bei einer alten WAMP-Server-Installation klappte es, aber nun mit der neuen Version 2.1 nicht mehr.
Weiß einer, woran es liegen könnte?
Ich habe das nachfolgende Testscript verwendet von w3schools (http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_callback).
Grüße
Netzwerkidi
---------------------------------------
Fileinhalt ajax_info.txt:
ich habe mir heute noch einmal die neue WAMP-Serverumgebung auf dem Notebook installiert, nachdem die alte nicht mehr lief.
Und das klappt auch alles wunderbar, Aliases eingrichtet, Zugriffe funktionieren, test-Pfad, localhost...
Nur Ajax klappt leider gar nicht. Bei einer alten WAMP-Server-Installation klappte es, aber nun mit der neuen Version 2.1 nicht mehr.
Weiß einer, woran es liegen könnte?
Ich habe das nachfolgende Testscript verwendet von w3schools (http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_callback).
Grüße
Netzwerkidi
---------------------------------------
Code:
<html>
<head>
<script type="text/javascript">
var xmlhttp;
function loadXMLDoc(url,cfunc)
{
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=cfunc;
xmlhttp.open("GET",url,true);
xmlhttp.send();
}
function myFunction()
{
loadXMLDoc("ajax_info.txt",function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
});
}
</script>
</head>
<body>
<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="myFunction()">Change Content</button>
</body>
</html>
Fileinhalt ajax_info.txt:
Code:
<p>AJAX is not a new programming language.</p>
<p>AJAX is a technique for creating fast and dynamic web pages.</p>