I am trying to get a connection to my php file and currently I keep getting a 404 error.
Code:
function loadXMLDoc(id)
{
var xmlhttp;
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=function()
{
alert('xmlhttp.readyState: '+xmlhttp.readyState+' xmlhttp.status: '+xmlhttp.status);
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("left_column").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","get_ajax.php?postid="+id,true);
xmlhttp.send();
}
I have the get_ajax.php file in the same directory as my js file that is handling my ajax call
What am I missing here?
Thanks alot