you mixed up variables and string represantations of them, heres a corrected version
<li><a href="#" class="decorNavi" onclick ="xmlRequest('about')" >ABOUT</a></li>
so now youre passing a string as argument
function xmlRequest(target){
var targetClick;
//here you say the string argument now is called targetClick
targetClick = target;
if (window.XMLHttpRequest) {
xmlRequest = new XMLHttpRequest();
}
else{
xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
//in this line you concatinate the variable with another string, result is a string so you dont need to quote the variable, this wouldnt work
xmlRequest.open("GET", targetClick+".html?="+Math.random() , true);
xmlRequest.onreadystatechange = function(){
if (xmlRequest.readyState == 4 && xmlRequest.status ==200) {
document.getElementById("midContainer").innerHTML = xmlRequest.responseText;
}
}
xmlRequest.send();
}
you need to run this on a webserver, when using the "file://" protocoll youl get a cross origin error, additionally the url needs to be on the same host