var xmlHttp=null;
function paging(currentpage, orderby, ascdesc, zone)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return false;
}
var url="js/projects.php";
url=url+"?currentpage="+encodeURIComponent(currentpage);
url=url+"&orderby="+encodeURIComponent(orderby);
url=url+"&ascdesc="+ascdesc;
url=url+"&zone="+encodeURIComponent(zone);
url=url+"&sid="+Math.random();
var newfield="project_paging_holder";
newfield=newfield;
document.getElementById(newfield).innerHTML = '';
xmlHttp.onreadystatechange=function(){stateChanged(newfield)};
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged(newfield)
{
if (xmlHttp.readyState==4)
{
document.getElementById(newfield).innerHTML=xmlHttp.responseText;
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
|