Pathname in javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Asad

    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.XMLDO M")
    xmlDoc.async="f alse"
    xmlDoc.load("sa mple.xml")

    But this doesn't:

    var xmlDoc=new ActiveXObject(" Microsoft.XMLDO M")
    xmlDoc.async="f alse"
    xmlDoc.load("c:/sample.xml")

    or anything else for that matter ...

    Why is this?
  • bruce

    #2
    Re: Pathname in javascript

    asadikhan@hotma il.com (Asad) wrote in message news:<fdcee255. 0405260502.4ac9 d323@posting.go ogle.com>...[color=blue]
    > 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.XMLDO M")
    > xmlDoc.async="f alse"
    > xmlDoc.load("sa mple.xml")
    >
    > But this doesn't:
    >
    > var xmlDoc=new ActiveXObject(" Microsoft.XMLDO M")
    > xmlDoc.async="f alse"
    > xmlDoc.load("c:/sample.xml")
    >
    > or anything else for that matter ...
    >
    > Why is this?[/color]


    It's working for me!

    Comment

    Working...