here is more detail (the error, the html file, the xml file)...
opera throws this error (more detail than firefox):
Event thread: load
Error:
name: TypeError
message: Statement on line 32: Could not convert undefined or null to object
Backtrace:
Line 32 of inline#1 script in http://voodoo/sfv/testxml.html
var Listing = areaXML.getElementsByTagName("time");
Line 1 of script
testrun();
______________________________________________________________
here is the html file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>asdf</title>
<script >
var theXML;
var areaXML;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
theXML = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
theXML = new XMLHttpRequest();
}
}
function startRequest() {
var dataFile='content/monthlycalendar.xml';
createXMLHttpRequest();
theXML.onreadystatechange = handleStateChange;
theXML.open("GET", dataFile, true);
theXML.send(null);
}
function handleStateChange() {
if(theXML.readyState ==4) {
if(theXML.status == 200) {
areaXML = theXML.responseXML;
}
}
}
function testrun() {
startRequest();
var Listing = areaXML.getElementsByTagName("time");
document.getElementById("bigone").innerHTML = Listing[0].childNodes[0].nodeValue;
}
</script>
</head>
<body onload="testrun();">
<DIV align="center" id="bigone">nothinhere</DIV>
</body>
</html>
---------------------------------------------------------------------------------------------------------------
here is the xml file being called:
<?xml version="1.0"?>
<!DOCTYPE area [
<!ELEMENT area (subarea)>
<!ATTLIST area name CDATA " ">
<!ELEMENT subarea (event)>
<!ATTLIST subarea name CDATA " ">
<!ATTLIST subarea title CDATA " ">
<!ELEMENT event (date, time, type, topic, notes, location)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT topic (#PCDATA)>
<!ELEMENT notes (#PCDATA)>
<!ELEMENT location (#PCDATA)>
]>
<area name="monthlycalendar">
<subarea name="events" title="On the Schedule">
<event>
<date>2007,2,7</date>
<time>8PM</time>
<type>lecture</type>
<topic>The Call of the Wild</topic>
<notes></notes>
<location>Old Temple</location>
</event>
<event>
<date>2007,2,14</date>
<time>8PM</time>
<type>lecture</type>
<topic>Mom is On The Phone</topic>
<notes></notes>
<location>New Temple</location>
</event>
</subarea>
</area>