In dit topic zijn we er al een paar dagen over bezig. Misschien dat jullie ons verder kunnen helpen??? (Om dubbelposten te voorkomen heb ik om een slotje gevraagd voor bovenstaande thread.)
We zijn dus bezig om de coolmon xml file (http://schoonens.dyndns.org:61300) op te vragen in een pagina. Daar hebben we dit script voor:
De code kun je ook lezen door http://www.schoonens.nl/camiel/coolmon2.html te openen. Wat ik ook doe, ik krijg een foutmelding, wanneer ik deze debug kom ik er achter dat msxml3.dll een "access denied" geeft. Zoeken bij google heeft wel wat opgeleverd maar niet veel. Er wordt o.a. gesproken over deze mogelijke oplossingen:
[oplossingen]
Quote van jouw google search result:
"I have seen this problem often - and almost every time it has been the result of trying to access the DOM before the parser has completely loaded the DOM. One approach is to set the async property to false on the DOM prior to loading it. Another is to set up a timer loop where you check the readyState property, watching for a change to "4" - meaning the XML has been fully parsed and the DOM loading is complete. "
[oplossingen]
Wat betekend de readyState property (heb bij msdn gekeken) en hoe moet ik die wegschrijven in mijn code?
We zijn dus bezig om de coolmon xml file (http://schoonens.dyndns.org:61300) op te vragen in een pagina. Daar hebben we dit script voor:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| <script language="JavaScript">
function GetNode(dom,xpath){
var node = dom.selectSingleNode(xpath);
var value = node.text;
return value;
}
function UpdateReadings(){
dom = new ActiveXObject("Msxml.DOMDocument");
dom.async = false;
dom.load("http://schoonens.dyndns.org:61300");
cpu_load.innerHTML =
GetNode(dom,"CoolMon/Raw/Processor_Usage");
}
function CoolMon(){
window.setInterval('UpdateReadings()',1000);
}
</script> |
De code kun je ook lezen door http://www.schoonens.nl/camiel/coolmon2.html te openen. Wat ik ook doe, ik krijg een foutmelding, wanneer ik deze debug kom ik er achter dat msxml3.dll een "access denied" geeft. Zoeken bij google heeft wel wat opgeleverd maar niet veel. Er wordt o.a. gesproken over deze mogelijke oplossingen:
[oplossingen]
Quote van jouw google search result:
"I have seen this problem often - and almost every time it has been the result of trying to access the DOM before the parser has completely loaded the DOM. One approach is to set the async property to false on the DOM prior to loading it. Another is to set up a timer loop where you check the readyState property, watching for a change to "4" - meaning the XML has been fully parsed and the DOM loading is complete. "
[oplossingen]
Wat betekend de readyState property (heb bij msdn gekeken) en hoe moet ik die wegschrijven in mijn code?