MattL920
08-17-2005, 07:10 PM
I have a page where part of the content is gotten by loading an xml file through javascript, then an xsl document used to transform that to html, then document.write-ing that resulting html, like:
function loadXML(url){
var xml = new ActiveXObject("Microsoft.XMLDOM");
var xsl = new ActiveXObject("Microsoft.XMLDOM");
xsl.async = false;
xsl.load('the_xsl_file.xsl');
xml.onreadystatechange = function () {
if (xml.readyState == 4) document.write(xml.transformNode(xsl));
};
xml.load(url);
}
Part of the output of the xml-xsl transform are <script> tags with calls to some javascript functions inside them. The problem I'm having is that when I open this page locally just to test it out, everything works fine, and the code inside the <script> tags output by xsl get called like they're supposed to. But when I put it up on a web server to test it out, none of that code gets called and my page breaks.
I can't figure out what's preventing that from being called when it's on the web but doesn't prevent it when I open it locally. I'd really appreciate help on this.
thanks.
function loadXML(url){
var xml = new ActiveXObject("Microsoft.XMLDOM");
var xsl = new ActiveXObject("Microsoft.XMLDOM");
xsl.async = false;
xsl.load('the_xsl_file.xsl');
xml.onreadystatechange = function () {
if (xml.readyState == 4) document.write(xml.transformNode(xsl));
};
xml.load(url);
}
Part of the output of the xml-xsl transform are <script> tags with calls to some javascript functions inside them. The problem I'm having is that when I open this page locally just to test it out, everything works fine, and the code inside the <script> tags output by xsl get called like they're supposed to. But when I put it up on a web server to test it out, none of that code gets called and my page breaks.
I can't figure out what's preventing that from being called when it's on the web but doesn't prevent it when I open it locally. I'd really appreciate help on this.
thanks.