Permalink Ajax Issue Wordpress
- by Soumya
function AjaxRequest(section,divName)
{
var pageurl = fullPath+"/ajaxrequest.php?section="+section+"&divName="+divName;
//alert(pageurl);
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()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(divName).innerHTML='';
document.getElementById(divName).innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET",pageurl,true);
xmlhttp.send();
}
I have a Code like that in wordpress which is calling a page using ajax. It is working fine when the page are coming in ID like ?page_id=37 but stop working when I am activating Permalink like /overview/ajaxpage. I am getting 404 pafe error on xmlhttp.readyState. Can any one help me to solve it. I know its a permalink Problem probably this code of ajax is not sufficient for transmuting Permalink.