XML object

wxdqz

New Member
/*
DOM XML ticker- ?Dynamic Drive (<!-- w --><a class="postlink" href="http://www.dynamicdrive.com">www.dynamicdrive.com</a><!-- w -->)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit <!-- m --><a class="postlink" href="http://www.dynamicdrive.com">http://www.dynamicdrive.com</a><!-- m -->
Credit MUST stay intact
*/

//Container for ticker. Modify its STYLE attribute to customize style:
var tickercontainer='<marquee align="center" behavior="alternate" scrollamount="3" id="container" style="background-color:#d6e4fb;width:740px;height:12px;font:normal 13px tahoma,Verdana;"></marquee>'

//Specify path to xml file
var xmlsource="ticker.xml"

////No need to edit beyond here////////////
//load xml file
if (window.ActiveXObject)
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
else if (document.implementation && document.implementation.createDocument)
var xmlDoc= document.implementation.createDocument("","doc",null);
if (typeof xmlDoc!="undefined"){
document.write(tickercontainer)
xmlDoc.load(xmlsource)
}


Hi,
The above code is a part of script that make a ticker from xml file. I think that first -if- for MSIE and the -else if- make the same thing, but for Mozilla in each it creates xml object.
What I want is : 1- understand those for mozilla
2- suppose that ticker.xml file on another server, i.e <!-- m --><a class="postlink" href="http://host.com/ticker.xml">http://host.com/ticker.xml</a><!-- m -->, how can I get it into script such as this?
 
Back
Top