fixed/added page level docblock
This commit is contained in:
@@ -1,35 +1,42 @@
|
||||
/* $Id$ */
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var http_request = false;
|
||||
var xmldoc;
|
||||
var textdoc;
|
||||
|
||||
|
||||
function makeRequest(url, parameters)
|
||||
function makeRequest(url, parameters)
|
||||
{
|
||||
http_request = false;
|
||||
if (window.XMLHttpRequest)
|
||||
if (window.XMLHttpRequest)
|
||||
{ // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); }
|
||||
}
|
||||
else
|
||||
if (window.ActiveXObject)
|
||||
}
|
||||
else
|
||||
if (window.ActiveXObject)
|
||||
{ // IE
|
||||
try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); }
|
||||
catch (e)
|
||||
try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); }
|
||||
catch (e)
|
||||
{
|
||||
try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); }
|
||||
try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); }
|
||||
catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request)
|
||||
if (!http_request)
|
||||
{
|
||||
alert('Giving up :( Cannot create an XMLHTTP instance');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
http_request.onreadystatechange = alertContents;
|
||||
http_request.open('POST', url, true);
|
||||
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
@@ -38,9 +45,9 @@ function makeRequest(url, parameters)
|
||||
http_request.send(parameters);
|
||||
}
|
||||
|
||||
function alertContents()
|
||||
function alertContents()
|
||||
{
|
||||
if (http_request.readyState == 1 )
|
||||
if (http_request.readyState == 1 )
|
||||
{
|
||||
document.getElementById("layer_action").style.left = document.body.clientWidth + document.body.scrollLeft - 85;
|
||||
document.getElementById("layer_action").style.top = document.body.scrollTop + 10;
|
||||
@@ -48,23 +55,23 @@ function alertContents()
|
||||
}
|
||||
if (http_request.readyState == 2 ) document.getElementById("layer_action").innerHTML = 'Loaded';
|
||||
if (http_request.readyState == 3 ) document.getElementById("layer_action").innerHTML = 'Loading 99%';
|
||||
if (http_request.readyState == 4 )
|
||||
if (http_request.readyState == 4 )
|
||||
{
|
||||
if (http_request.status == 200)
|
||||
if (http_request.status == 200)
|
||||
{
|
||||
textdoc = http_request.responseText;
|
||||
//alert(textdoc);
|
||||
xmldoc = http_request.responseXML;
|
||||
xmldoc = http_request.responseXML;
|
||||
PrintXML();
|
||||
document.getElementById("layer_action").style.visibility = 'hidden';
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('There was a problem with the request.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function PrintXML()
|
||||
{
|
||||
var root = xmldoc.getElementsByTagName('root').item(0); //root
|
||||
@@ -82,7 +89,7 @@ function PrintXML()
|
||||
//alert(root.attributes[0].nodeValue);
|
||||
//alert(xmldoc.getElementsByTagName('root')[0].attributes[0].nodeValue);
|
||||
//xmldoc.getElementsByTagName('root')[0].getAttribute("act")
|
||||
|
||||
|
||||
if(root.getAttribute('act') == 'save_pos')
|
||||
alert(strLang[root.getAttribute('return')]);
|
||||
if(root.getAttribute('act') == 'relation_upd')
|
||||
|
Reference in New Issue
Block a user