469,929 Members | 1,837 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

Pathname in javascript

Hi,

I am trying to load an XML file. The problem is that it only works if
the xml file is in the same directory as the file containing the
Javascript that loads it. So this works:

var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("sample.xml")

But this doesn't:

var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("c:/sample.xml")

or anything else for that matter ...

Why is this?
Jul 23 '05 #1
1 1394
as*******@hotmail.com (Asad) wrote in message news:<fd**************************@posting.google. com>...
Hi,

I am trying to load an XML file. The problem is that it only works if
the xml file is in the same directory as the file containing the
Javascript that loads it. So this works:

var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("sample.xml")

But this doesn't:

var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("c:/sample.xml")

or anything else for that matter ...

Why is this?

It's working for me!
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by il barbi | last post: by
2 posts views Thread by Tracey | last post: by
3 posts views Thread by tac-tics | last post: by
1 post views Thread by marathoner | last post: by
1 post views Thread by Valerie | last post: by
10 posts views Thread by =?Utf-8?B?TWF0dA==?= | last post: by
2 posts views Thread by find clausen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.