Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling on an xml file in a different folder

Status
Not open for further replies.

danfood

Programmer
Aug 8, 2001
32
0
0
GB
It should be simple this one.

I want to call an XML file that is in a different folder from the HTML file that is calling it.
So I have the code in my HTML document:


<script language=&quot;javascript&quot;>
// Load XML
var xml = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;)
xml.async = false
xml.load(&quot;MYFILE.xml&quot;)
'in here I want to stick in something like:
'xml.load(&quot;..\another\folder\MYFILE.xml&quot;)
'but when I do this it doesn't work.
'what am I missing?
'I've tried the full path but that doesn't work either.


// Load the XSL
var xsl = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;)
xsl.async = false
xsl.load(&quot;MYFILE.xsl&quot;)


// Transform
document.write(xml.transformNode(xsl))



</script>


Cheers
Dan
 
Nice one penguin!
It worked a treat.

I thought I had tried that, but obviously I hadn't.


Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top