Mauler
07-22-2003, 08:29 PM
I have a problem with the following code, which dsplays and updates from an XML file every 60 seconds. When refreshing, it periodically generates an error while accessing the xml data.
I used 'document.write(xml.parseError.url)' which pointed to the xml file as the problem. The xml file is sent to the server by FTP from another source. I suspect that the conflict may be from the Refresh attempt being blocked as the file is being updated from the external source.
I had a thought of getting the xml provider to add an 'ok.txt' file to their transfer, delete as 1st step, send xml, then send ok.txt again. Mean while, my script starts with a conditional 'if' that looks for the ok.txt prior to execution.
Am I on the right track here, and if so ...... HELP
Thanks in advance for any help.
<html>
<head>
<META Http-Equiv="refresh" CONTENT="60">
<link rel="stylesheet" href="../score.css">
</head>
<link href="../score.css" rel="stylesheet" type="text/css">
<body>
<script type="text/javascript">
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("nrlmatch.xml")
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("nrlsummary.xsl")
document.write(xml.transformNode(xsl))
</script>
</body>
</html>
:)
I used 'document.write(xml.parseError.url)' which pointed to the xml file as the problem. The xml file is sent to the server by FTP from another source. I suspect that the conflict may be from the Refresh attempt being blocked as the file is being updated from the external source.
I had a thought of getting the xml provider to add an 'ok.txt' file to their transfer, delete as 1st step, send xml, then send ok.txt again. Mean while, my script starts with a conditional 'if' that looks for the ok.txt prior to execution.
Am I on the right track here, and if so ...... HELP
Thanks in advance for any help.
<html>
<head>
<META Http-Equiv="refresh" CONTENT="60">
<link rel="stylesheet" href="../score.css">
</head>
<link href="../score.css" rel="stylesheet" type="text/css">
<body>
<script type="text/javascript">
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("nrlmatch.xml")
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("nrlsummary.xsl")
document.write(xml.transformNode(xsl))
</script>
</body>
</html>
:)