By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Pathname in javascript

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.