473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 1451
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: il barbi | last post by:
I delivered a test DB where in the main form there are some frames with associate object with Word files (linked). Now the customer asks me how to get the pathname of the Word files and indeed I...
2
by: Tracey | last post by:
Can someone tell me how to load a xml file into a xmldocument object by pathname of the xml file? Thanks in advance!
3
by: tac-tics | last post by:
I know about os.path.split(), but Is there any standard function for "fully" splitting a file's pathname? A function that is the opposite of the os.path.join() function? For example: In the...
1
by: marathoner | last post by:
When I use the FileUpLoadControl to select a file, I can only retrieve the filename that was selected. I want to know how to retrieve the full pathname of the filename selected. Marathoner
3
by: hpber | last post by:
Hello, I try to check the existence of a file with the function _findfirst(...). The file is located in a directory with a blank in its path name: C: \Program Files\ExtPrg.exe When I run the...
1
by: Valerie | last post by:
Hello everyone, I am new in PHP-programming but I am learning the basics of it. I've got a script that uploads a picture together with all data from the inputform, to the server and places the...
10
by: =?Utf-8?B?TWF0dA==?= | last post by:
I am using the following code to connect to and download files from an ftp server, but the Symantec anti-virus software on some of my customers machines tells them that their computers are...
2
by: find clausen | last post by:
But something like: location.pathname.indexOf I want to check if there in the path is a folder named 'travel' tried this: if (location.pathname.indexOf('travel')) zlang = 1; :-(
2
by: superunknownman | last post by:
I was trying to capture the pathname only when using var from= window.location.pathname; and I want to lose the filename. Is there another way for me to get just the path?
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.