hi, i have the code below but getElementById(setID) not working for me, i know it catches the id because alert(setID) working.
any idea?
function getdata(file, aID){
req = xmlHttpRequestHandler.createXmlHttpRequest();
req.onreadystatechange = Response;
req.open("GET", file, true);
req.send(null);
setID = aID;
}
function Response() {
var ready, status;
try {
ready = req.readyState;
status = req.status;
}
catch(e) {}
if (ready == 4 && status == 200) {
document.getElementById("data").innerHTML = req.responseText;
}
document.getElementById(setID).className = "someclass";
}
<div class="msg" id="someid">
<a href="javascript:getdata('data.php', 'someid')">somelink</a>
</div>