سلام
من تازه میخوام ایجکس رو شروع کنم.
برای شروع این کد رو نوشتم ولی کار نمیکنه.کسی میدونه مشکلم چیه؟

<!doctype html>
<html>
<head>
<title>AJAX</title>
<script type="text/javascript">
function createXMLHttp(){
if(typeof XMLHttpRequest !="undefined"){
return new XMLHttpRequest();
}else if(window.ActiveXObject){
var iEVersion=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2. XMLHttp.3.0","<MSXML2.XMLHttp","Microsoft.XMLHttp"];
for(var i=0;i<iEVersion.length;i++){
try{
var xmlHttp=new ActiveXObject(iEVersion[i]);
return xmlHttp;
}catch(oError){
}
}
}
throw new Error("XMLHttp ovject could not be created.")
}
function getData(dataSource,divID){
xmlHttp=createXMLHttp();
xmlHttp.open("GET",dataSource);
xmlHttp.Onreadystatechange=function(){
if(xmlHttp.readyState==4 && xmlHttp.status==200){
obj.innerHTML=xmlHttp.responseText;
}
}
xmlHttp.send(null);
}
</script>
</head>
<body>
<input type="button" value="Display Message" onclick="getData('Data.txt','targetDiv')">
<div id="targetDiv">
<p>Display Message Here.</p>
</div>
</body>
</html>


در ضمن کنار این فایل html یه فایل Data.txt هم ساختم که حاوی یه جمله هست