Wrox Programmer Forums
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 30th, 2003, 02:33 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default XML and NN

Dear All,
    I've got a small JS app that uses XML and I've got it working fine in IE, but not in NN, I've used plenty of the samples on the web with my Netscape Communicator and NN 6.1 but they just to seem to solve the problem. The relevant code is below :

var text = new Array();
var header = new Array();
var linka = new Array();
var targa = new Array();
var newsItems;

// create an XMLDoc
var xmldoc;

if (document.implementation && document.implementation.createDocument)
    xmldoc = document.implementation.createDocument("", "", null);
else if (window.ActiveXObject)
    // create a new XML object for IE
    xmldoc=new ActiveXObject("Microsoft.XMLDOM");
    alert('Your browser can\'t handle this script');

// define some attributes of the doc
xmldoc.async = false;

//load the XML file in

// load the moves
newsItems = xmldoc.getElementsByTagName("newselement");

// populate the Move Arrays from the XML file
for (var i=0;i<newsItems.length;i++)
    // add the move
with the XML file being used as follows :

        <headline>This is Headline 1</headline>
        <newsitem>This is NI 1</newsitem>
        <headline>This is Headline 2</headline>
        <newsitem>This is NI 2</newsitem>
        <headline>This is Headline 3</headline>
        <newsitem>This is NI 3</newsitem>
Can anyone help me out with this as it is driving me nuts !!
All the best

Greg Griffiths
Web & Livelink Developer

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2005 XML: FOR XML PATH -> cdata? stoves SQL Server 2005 1 July 8th, 2008 02:40 AM
xml invalid top level from ASP write XML(solution) g000we XML 0 August 9th, 2006 03:56 AM
DTS Package, XML task. Read XML file and store it Victoria SQL Server DTS 0 July 24th, 2006 02:43 PM
JavaScript & XML & NN lmod Javascript How-To 0 August 18th, 2005 03:16 PM
XML and NN Greg Griffiths Javascript 1 October 31st, 2003 06:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.