I'm getting this error:
'document.getElementsByTagName(...).0' is null or not an object - but only when its on the server. It works fine when I'm running it off the harddisk.
I found lots of other posts about this but none of their solutions worked for me.
When you click the button it parses an xml file, formats it with an xsl then places it into the Popup.html. Like I said it works when loading off the harddrive.
The Popup.html has only html, head and body tags in.
'document.getElementsByTagName(...).0' is null or not an object - but only when its on the server. It works fine when I'm running it off the harddisk.
I found lots of other posts about this but none of their solutions worked for me.
When you click the button it parses an xml file, formats it with an xsl then places it into the Popup.html. Like I said it works when loading off the harddrive.
Code:
<script language="JScript" defer="true">
function verify()
{
if (xml.readyState != 4)
{
return false;
}
}
xml.load("Cinema.xml");
function showCinema(venueID)
{
var xml = new ActiveXObject("Msxml2.DOMDocument.3.0");
xml.async = false;
xml.onreadystatechange=verify;
var xsl = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
xsl.async = false;
xsl.load("Cinema.xsl");
var temp = new ActiveXObject("MSXML2.XSLTemplate");
temp.stylesheet = xsl;
var proc = temp.createProcessor();
proc.addParameter("venueID", venueID);
proc.input = xml;
proc.transform();
var str = proc.output;
var mypop=window.open('Popup.html','newwin','scrollbars=yes,menubar=no,height=600,width=450,resizable=no,toolbar=no,location=no,status=no');
mypop.document.getElementsByTagName('body')[0].innerHTML = str;
}
</script>
The Popup.html has only html, head and body tags in.