1
JavaScript & JScript / Падает ИЕ
« : 21 Ноября 2006, 15:52:51 »
Проблема была на самом деле связана с утечкой памяти. См. тему Удаление таблиц.
В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.
while(tBodyObj.firstChild)
{
var trow = tBodyObj.firstChild;
while(trow.firstChild)
{
var cell = trow.firstChild;
trow.removeChild(cell);
cell = null;
}
tBodyObj.removeChild(trow);
trow = null;
}
this.url = url;
this.req = null;
this.parser = parser;
this.ErrorFeed = this.defErrorFeed;
this.errorMsg = "Data loading error!";
this.loadData(url);
loadData: function(url)
{
if(window.XMLHttpRequest)
{
try { this.req = new XMLHttpRequest(); }
catch (e) { this.req = false; }
}
else if(window.ActiveXObject)
{
try
{
this.req = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try { this.req = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { this.req = false; }
}
}
if(this.req)
{
try
{
var load = this;
this.req.onreadystatechange = function()
{
load.onReadyState.call(load);
}
this.req.open(\'GET\',url,true);
this.req.send(null);
}
catch(e)
{
this.ErrorEeed.call(this);
}
}
else
{
this.errorMsg = "Error creating XmlHttp object!";
this.ErrorEeed.call(this);
}
},
onReadyState:function()
{
var req = this.req;
if(req.readyState == 4)
{
var httpStatus = req.status;
if(httpStatus == 200 || httpStatus == 0)
this.parser.call(this);
else
this.ErrorFeed.call(this);
}
},
defErrorFeed:function()
{
alert(this.errorMsg);
}
var script = this.req.responseText;
eval(script);
var url = "http://www.amity.ru/plugins/p890_monitor/tUpdate.php?rnd=" + ign();
var l = new srvr.loader(url,fetchData);
last_update = setTimeout(\'TblsUpdate()\',30000);