Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:31:34+00:00 2026-05-24T21:31:34+00:00

Internet Explorer 8: Google Chrome version 13: Javascript: XSLT: XML: In IE 8 nothing

  • 0

Internet Explorer 8:
Google Chrome version 13:
Javascript:
XSLT:
XML:

In IE 8 nothing popluates but opera and firefox are just fine. When I load the javascript in Chrome 13.1 the first xml doc shows up and the 2nd and 3rd do not show up at all. I am referencing the three xml files in the xslt file. The javascript is from w3shools.
How can I get these to populate in IE and Chrome?

Files:
load_xml_javascript.html
delivery_and_activity.xsl
delivery.xml
activity.xml
click_through.xml

load_xml_javascript.html

<html>
<head>
<script>
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}

function displayResult()
{
xml=loadXMLDoc("delivery.xml");
xsl=loadXMLDoc("delivery_activity_clickthrough.xsl");
// code for IE
if (window.ActiveXObject)
  {
  ex=xml.transformNode(xsl);
  document.getElementById("example").innerHTML=ex;
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
  {
  xsltProcessor=new XSLTProcessor();
  xsltProcessor.importStylesheet(xsl);
  resultDocument = xsltProcessor.transformToFragment(xml,document);
  document.getElementById("example").appendChild(resultDocument);
  }
}
</script>
</head>
<body onLoad="displayResult()">
<div id="example" />
</body>
</html>

delivery_and_activity.xsl

<?xml version="1.0" encoding="utf-8"?>
<!-- DWXMLSource="delivery.xml" -->
<!DOCTYPE xsl:stylesheet  [
    <!ENTITY nbsp   "&#160;">
    <!ENTITY copy   "&#169;">
    <!ENTITY reg    "&#174;">
    <!ENTITY trade  "&#8482;">
    <!ENTITY mdash  "&#8212;">
    <!ENTITY ldquo  "&#8220;">
    <!ENTITY rdquo  "&#8221;"> 
    <!ENTITY pound  "&#163;">
    <!ENTITY yen    "&#165;">
    <!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-

system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Delivery Summary</title>
    </head>
    <body>
    <h2 style="margin: 25px 0px -20px 30px; color: #003399;">Delivery Summary</h2>
    <table style="margin: 25px; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; text-align:left; font-size:12px; 

border-collapse:collapse">
      <thead>
        <tr>
          <th width="165" height="30" scope="col" style="background: #b9c9fe url('left.png') left -1px no-repeat; color: #003399; 

padding: 8px;">Type</th>
          <th width="209"  scope="col" style="background: #b9c9fe; color: #003399; padding: 8px;">% of Attempted to Deliver</th>
          <th width="90" scope="col" style="background: #b9c9fe url('right.png') right -1px no-repeat; padding: 8px; color: 

#003399;">Total</th>
        </tr>
      </thead>
      <tfoot>
      </tfoot>
      <tbody>
        <xsl:for-each select="DELIVERY/SUMMARY">
          <tr>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="TITLE"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="ATTEMPTED"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="TOTAL"/></td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
    <h2 style="margin: 25px 0px -20px 30px; color: #003399;">Activity Summary</h2>
    <table style="margin: 25px; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; text-align:left; font-size:12px; 

border-collapse:collapse">
      <thead>
        <tr>
          <th width="165" height="30" scope="col" style="background: #b9c9fe url('left.png') left -1px no-repeat; color: #003399; 

padding: 8px;">Type</th>
          <th width="209"  scope="col" style="background: #b9c9fe; color: #003399; padding: 8px;">% of Successfully Delivered</th>
          <th width="90" scope="col" style="background: #b9c9fe url('right.png') right -1px no-repeat; padding: 8px; color: 

#003399;">Total</th>
        </tr>
      </thead>
      <tfoot>
      </tfoot>
      <tbody>
         <xsl:for-each select="document('activity.xml')/ACTIVITY/SUMMARY">
          <tr>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="TITLE"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="ATTEMPTED"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="TOTAL"/></td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
        <h2 style="margin: 25px 0px -20px 30px; color: #003399;">Click Through Report</h2>
    <table style="margin: 25px; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; text-align:left; font-size:12px; 

border-collapse:collapse">
      <thead>
        <tr>
          <th width="165" height="30" scope="col" style="background: #b9c9fe url('left.png') left -1px no-repeat; color: #003399; 

padding: 8px;">Type</th>
          <th width="209"  scope="col" style="background: #b9c9fe; color: #003399; padding: 8px;">% of Successfully Delivered</th>
          <th width="90" scope="col" style="background: #b9c9fe url('right.png') right -1px no-repeat; padding: 8px; color: 

#003399;">Total</th>
        </tr>
      </thead>
      <tfoot>
      </tfoot>
      <tbody>
         <xsl:for-each select="document('click_through.xml')/ACTIVITY/SUMMARY">
          <tr>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="URL"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="UNIQUE"/></td>
            <td style="background: #e8edff; color: #003399; padding: 8px; border-top: 1px solid #fff;"><xsl:value-of 

select="TOTAL"/></td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
    </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

delivery.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<DELIVERY>
    <SUMMARY>
        <TITLE>Attempted to deliver</TITLE>
        <ATTEMPTED>100</ATTEMPTED>
        <TOTAL>21256</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Hard Bounces</TITLE>
        <ATTEMPTED>.68</ATTEMPTED>
        <TOTAL>145</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Soft Bounces</TITLE>
        <ATTEMPTED>4.48</ATTEMPTED>
        <TOTAL>953</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Successfully delivered</TITLE>
        <ATTEMPTED>94.8</ATTEMPTED>
        <TOTAL>20158</TOTAL>
    </SUMMARY>
</DELIVERY>

activity.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<ACTIVITY>
    <SUMMARY>
        <TITLE>Opened</TITLE>
        <ATTEMPTED>22.96</ATTEMPTED>
        <TOTAL>4629</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Clicked Through</TITLE>
        <ATTEMPTED>4.10</ATTEMPTED>
        <TOTAL>829</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Replied</TITLE>
        <ATTEMPTED>0.12</ATTEMPTED>
        <TOTAL>24</TOTAL>
    </SUMMARY>
    <SUMMARY>
        <TITLE>Unsubscribed</TITLE>
        <ATTEMPTED>0.25</ATTEMPTED>
        <TOTAL>51</TOTAL>
    </SUMMARY>
        <SUMMARY>
        <TITLE>Forwarded</TITLE>
        <ATTEMPTED>0.00</ATTEMPTED>
        <TOTAL>0</TOTAL>
    </SUMMARY>
        <SUMMARY>
        <TITLE>Subscribed</TITLE>
        <ATTEMPTED>0.00</ATTEMPTED>
        <TOTAL>0.00</TOTAL>
    </SUMMARY>
        <SUMMARY>
        <TITLE>SpamComplaints</TITLE>
        <ATTEMPTED>0.3</ATTEMPTED>
        <TOTAL>6</TOTAL>
    </SUMMARY>
</ACTIVITY>

click_through.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<ACTIVITY>
    <SUMMARY>
        <URL>navbar weddings</URL>
        <UNIQUE>1</UNIQUE>
        <TOTAL>1</TOTAL>
    </SUMMARY>
        <SUMMARY>
        <URL>navbar honeymoon</URL>
        <UNIQUE>1</UNIQUE>
        <TOTAL>1</TOTAL>
    </SUMMARY>
        <SUMMARY>
        <URL>submit rfp</URL>
        <UNIQUE>1</UNIQUE>
        <TOTAL>1</TOTAL>
    </SUMMARY>
</ACTIVITY>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:31:35+00:00Added an answer on May 24, 2026 at 9:31 pm

    As alternative approach you could use simpler, non-JavaScript, browser’s client side XSL tranformation, without load_xml_javascript.html file, just add into delivery.xml (just below XML declaration) following line:

    <?xml-stylesheet type="text/xsl" href="delivery_and_activity.xsl"?>
    

    Tested (displaying three tables) on:

    • Internet Explorer 8
    • Firefox 6
    • Opera 11.50
    • Google Chrome 13, however for local (without web server) transformations you need run browser it with --allow-file-access-from-files switch
    • Safari 5.1

    For JavaScript based solution tables (second and third) are empty in Google Chrome 13 because document() function doesn’t work properly under Webkit engine. Take a look at:

    • Webkit Bug 60276
    • Chromium Issue 8441

    For Internet Explorer 8 (as well as 9) your simplified initial code looks:

    function loadXMLDoc(dname)
    {
        var xhttp;
        if (window.XMLHttpRequest)
            xhttp = new XMLHttpRequest();
    
        xhttp.open("GET", dname, false);
        xhttp.send("");
        return xhttp.responseXML;
    }
    
    function displayResult()
    {
        var xml = loadXMLDoc("delivery.xml");
        var xsl = loadXMLDoc("delivery_and_activity.xsl");
        if (window.ActiveXObject)
        {
            var output = xml.transformNode(xsl);
            document.getElementById("example").innerHTML = output;
        }
    }
    

    Use F12 to debug it, you should see error message (de facto the same issue as in here):

    Access is denied

    However you could try following code instead:

    function loadXMLDoc(filePath)
    {
        var xmlDoc;
        if (window.ActiveXObject)
        {
            xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
            xmlDoc.async = false;
            xmlDoc.validateOnParse = false;
            xmlDoc.load(filePath);
        }
        return xmlDoc;
    }
    function displayResult()
    {
        var xml = loadXMLDoc("delivery.xml");
        var xsl = loadXMLDoc("delivery_and_activity.xsl");
        if (window.ActiveXObject)
        {
            var output = xml.transformNode(xsl);
            document.getElementById("example").innerHTML = output;
        }
    }
    

    To display page properly cut these attributes:

    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    

    As you see it’s much easier to use browser’s native XSL transformation, rather than JavaScript based.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to invoke a browser (e.g. Internet Explorer/Firefox/Google Chrome/Opera) via a Java interface.
I'm wondering if there is a variable in Firefox, Internet Explorer and Google Chrome,
This jsFiddle example works in Google Chrome, but in Internet Explorer then when the
Some of the applications running on Windows 7 (Internet Explorer, Google Chrome, in example)
I've created a website that displays perfectly on Chrome, Firefox, Safari, and Internet Explorer
Using Process Explorer ( procexp.exe ), especially with Google Chrome, child processes are called
<a href=javascript:document.getElementById('create_table').style.display='block'>Insert Table</a> The code works perfectly fine in Google Chrome but in Internet
Is there a way to use Google Chrome (or Safari or Firefox) as the
The following source code alerts the following results: Internet Explorer 7 : 29 Firefox
Apparently, this call to window.open is not valid under Internet Explorer. The Javascript code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.