Permalink Ajax Issue Wordpress
Posted
by
Soumya
on Stack Overflow
See other posts from Stack Overflow
or by Soumya
Published on 2012-12-17T05:02:18Z
Indexed on
2012/12/17
5:02 UTC
Read the original article
Hit count: 189
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.
© Stack Overflow or respective owner