views:

24

answers:

0

I have a following code:

<script type="text/javascript">

if (window.ActiveXObject)
{
var xml;
xml=new ActiveXObject("Microsoft.XMLDOM");
xml.async=false;
xml.load("http://www.mypage.com/some.xml"); 

var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("http://www.mypage.com/some.xsl")

document.write(xml.transformNode(xsl))
}

// for Mozilla, Firefox, Opera
else if (document.implementation && document.implementation.createDocument)
  {
var processor = new XSLTProcessor(); 
var xsl=document.implementation.createDocument("","",null);
xsl.async=false;
xsl.load("http://www.mypage.com/some.xsl");
processor.importStylesheet(xsl);    

var xml=document.implementation.createDocument("","",null);
xml.async = false; 
xml.load("http://www.mypage.com/some.xml");
var result = processor.transformToDocument(xml);

var xmls = new XMLSerializer();
var output = xmls.serializeToString(result); 
document.write(output);
//alert("done"); 
}

</script>

The code works flawlessly in Internet Explorer and Firefox using the IFrame delivery method from OpenX ads server.

<iframe id='a04df860' name='a04df860' 
     src='http://ads.server.com/openx/www/delivery/afr.php?zoneid=21&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' 
     frameborder='0' scrolling='no' width='160' height='600'>
   <a href='http://ads.server.com/openx/www/delivery/ck.php?n=a9cfc92a&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'>
    <img src='http://ads.server.com/openx/www/delivery/avw.php?zoneid=21&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;amp;n=a9cfc92a' border='0' alt='' />
   </a>
</iframe>

But the code does not work in Google Chrome. I read that Chrome doens't support load command is that true? How would I have to modify my code so that it would show in Google Chrome?