loading an XML document using Firefox

Posted on 2007-08-05
Last Modified: 2013-12-07
i'm trying to load part of an XML document into Firefox and show the information in a CSS popup windox.  it works for IE but not for Firefox.  The code snippets are shown below:  

function show(dataSource)

            if (window.ActiveXObject) {
            var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
            xmlDoc.async = false;
           var stringHobby = xmlDoc.documentElement.lastChild.firstChild.nodeValue;
            var name = xmlDoc.getElementsByTagName("first")[0].firstChild.nodeValue;
           document.getElementById("popup").innerHTML = name + "'s hobbies:\n" + stringHobby;
            else {
             xmlDoc2= document.implementation.createDocument("","",null);
            var x = xmlDoc2.getElementsByTagName("hobbies")[0].firstChild.nodeValue;
            var name = xmlDoc2.getElementsByTagName("first")[0].firstChild.nodeValue;

            var popwin = document.getElementById("popup");


          <img name="showHobbies" src="" style="position:absolute;left:550;top:25;width:100;height:50" onmouseover="show(fullfile)" onmouseout="hide()">
        <div align=left style="left:50px">
        <p style="margin-left:100;margin-top:50;color:#FFFFFF;font-family:arial">
            <input type="radio" name="decision" value="interview" />Interview
            <input type="radio" name="decision" value="manager" />to Manager
            <input type="radio" name="decision" value="reject" checked />Reject</p>
          <div id="popup" style="position:absolute;left:600px; top:50px; width:150px; height:70px;"></div>
Question by:jpking72
    1 Comment
    LVL 60

    Accepted Solution

               xmlDoc2= document.implementation.createDocument("","",null);
                 xmlDoc2.async = false;

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now