home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
multimedia
/
mediacoder
/
MediaCoder-0.6.0.3830.exe
/
extensions
/
SysInfo.7z
/
sysinfo.js
< prev
next >
Wrap
Text File
|
2007-03-11
|
938b
|
41 lines
function onDataReady()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var xsl = loadXML("sysinfo.xsl");
transformXML(xmlhttp.responseXML, xsl, "content");
}
}
function onLoad()
{
xmlhttp.onreadystatechange = onDataReady;
xmlhttp.open('GET', "/mc/sysinfo.xml", true);
xmlhttp.overrideMimeType('text/xml');
xmlhttp.send(null);
//var xml = loadXML("sysinfo.xml");
}
function loadXML(xmlFile)
{
var $xml = new XMLHttpRequest;
$xml.open('GET', xmlFile, false);
$xml.overrideMimeType('text/xml');
$xml.send(null);
var xml = $xml.responseXML;
if (!xml) {
alert("Unable to load "+xmlFile);
return null;
}
return xml;
}
function transformXML(xmlDoc, xslDoc, element)
{
var XSLT = new XSLTProcessor;
XSLT.importStylesheet(xslDoc);
var e = document.getElementById(element);
if (e) {
e.innerHTML = "";
e.appendChild(XSLT.transformToFragment(xmlDoc, document));
}
}