Well, just some thoughts on this.
I do load multiple XML files , but I encapsulate
all the activity into a javascript class, which
allows me to say something like...
new DCxml("somewhere.xml",MyCallbackFunction)
new DCxml("somewhere2.xml",MyCallbackFunction)
new DCxml("somewhere3.xml",MyOtherCallbackFunction)
When the files or urls are loaded the callback function os called.
The only problem with this approach in your case it seems is that your
using document.write() , and I use post load methods like innerHTML and
such.
If you could do without the document.write, this could be solved fairly
quickly
je*********@hotmail.com wrote:
Can you load 2 xml files on an html page via javascript? I can get one
xml file to load, using the following code. How about two. I need to
combine 2 xmls files on the client. Any other way to do this?
<script type="text/javascript">
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("myXML.xml")
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("myXSL.xsl")// Transform
document.write(xml.transformNode(xsl))
</script>
--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML/CSS,Javascript,TCP ...
--`