xml help

    Date: 06/08/07 (Mozilla)    Keywords: xml, web

    I'm trying to add firefox functionality to get my AJAX control working on my website. This is the page in question. The error I'm getting is xmlobj has no document properties. Does anyone know where I went wrong?

    I've included the code below for your info.


    function changeListFF()
    {
    var plat = document.getElementById("platform")
    var lett = document.getElementById("letters")
    var alpha = new Array('#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');

    for(i = 0; i <= alpha.length; i++)
    {
    if(((plat.value == "Megadrive") || (plat.value == "MegaCD")) && (lett.value == alpha[i]))
    {
    checkList()

    if(plat.value == "Megadrive")
    {
    var xmlDoc=document.implementation.createDocument("", "", null);
    xmlDoc.async="false"
    xmlDoc.load("megadrive.xml")
    var xmlobj = xmlDoc.documentElement;
    }
    else if(plat.value == "MegaCD")
    {
    var xmlDoc=document.implementation.createDocument("", "", null);
    xmlDoc.async="false"
    xmlDoc.load("megacd.xml")
    var xmlobj = xmlDoc.documentElement;
    }

    for(j = 0; j < xmlobj.childNodes.length; j++)
    {
    if(xmlobj.childNodes(j).tagName == alpha[i])
    {
    var data = xmlobj.childNodes(j).firstChild.text
    var optionElement = document.createElement('option')
    var gameElement = document.getElementById("game")
    optionElement.text = data
    gameElement.add(optionElement)
    }
    }
    totNum()
    }
    }
    }


    Thanks very much!

    Source: http://community.livejournal.com/mozilla/390062.html

« Scoop - New Browser in the... || Short story competition »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home