function changepage(page,elname) {
if(navigator.appName == "Microsoft Internet Explorer")
{
http = new ActiveXObject("Microsoft.XMLHTTP");
} else
{
http = new XMLHttpRequest();
}
http.abort();
http.open("GET", "/serverrpc/cpage/" + elname + "/" + page, true);
http.onreadystatechange=function() {
if(http.readyState == 4)
{
document.getElementById(elname).innerHTML = http.responseText;;
}
}
http.send(null);
}
function ajaxpage(url, containerid)
{
var page_request = false
if (window.XMLHttpRequest) page_request = new XMLHttpRequest()
else if (window.ActiveXObject)
{
try
{
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e)
{
try
{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else return false
document.getElementById(containerid).innerHTML='Идет загрузка!!'
page_request.onreadystatechange=function()
{
loadpage(page_request, containerid)
}
page_request.open('GET', url, true)
page_request.send(null)
}
function loadpage(page_request, containerid)
{
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
loadString(absolute_url, mime_type)
Returns a string that is the contents of the resource
located at absolute_url if its MIME type is mime_type.
mime_type must begin with "text/".
Example:
var contents
= URL.loadString("http://www.developershome.com/wmlscript_reference.wml", "text/vnd.wap.wml");